-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[webview_flutter] Add a backgroundColor option to the webview platform interface #4567
[webview_flutter] Add a backgroundColor option to the webview platform interface #4567
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
This pull request is not mergeable in its current state, likely because of a merge conflict. Pre-submit CI jobs were not triggered. Pushing a new commit to this branch that resolves the issue will result in pre-submit jobs being scheduled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a test of the method channel passthrough (should be trivial); otherwise looks good.
@@ -266,6 +266,7 @@ class MethodChannelWebViewPlatform implements WebViewPlatformController { | |||
'userAgent': creationParams.userAgent, | |||
'autoMediaPlaybackPolicy': creationParams.autoMediaPlaybackPolicy.index, | |||
'usesHybridComposition': usesHybridComposition, | |||
'backgroundColor': creationParams.backgroundColor?.value, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a corresponding test here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put the test in the group('Tests on plugin.flutter.io/webview_<channel_id> channel', () {})
but maybe it would have been better to have them in a dedicated group for changes in creationParamsToMap()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@mvanbeusekom for secondary review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… platform interface (flutter/plugins#4567)
…m interface (flutter#4567) Part of flutter#3431 Part of flutter/flutter#29300
…m interface (flutter#4567) Part of flutter#3431 Part of flutter/flutter#29300
This PR add an option to set a transparent background for the webview.
Original PR (app-facing package, iOS, Android, platform interface): #3431
Part of flutter/flutter#29300
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.