-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[webview_flutter] Add a backgroundColor option to the Android webview #4569
[webview_flutter] Add a backgroundColor option to the Android webview #4569
Conversation
stuartmorgan-g
left a comment
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.
Minor nits, and this needs the auto-formatter run so CI passes.
@bparrishMines or @mvanbeusekom for secondary review.
| WebViewController controller, BuildContext context) async { | ||
| final String contentBase64 = | ||
| base64Encode(const Utf8Encoder().convert(kTransparentBackgroundPage)); | ||
| await controller.loadUrl('data:text/html;base64,$contentBase64'); |
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.
Nit: As with the iOS review, this can use loadHtmlString now.
packages/webview_flutter/webview_flutter_android/test/android_webview.pigeon.dart
Show resolved
Hide resolved
|
I made the changes. I also hard code the |
stuartmorgan-g
left a comment
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!
I made a dummy PR at #4579 to run the new test in CI just to make sure it's working there.
...d/app/src/androidTest/java/io/flutter/plugins/webviewflutterexample/BackgroundColorTest.java
Show resolved
Hide resolved
mvanbeusekom
left a comment
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 with one small nit
|
I've filed an issue tracking the FTL problem, and temporarily disabled the integration test. |
…flutter#4569) This PR add an option to set the background color of the Android webview. Part of: flutter#3431 Part of: flutter/flutter#29300
…flutter#4569) This PR add an option to set the background color of the Android webview. Part of: flutter#3431 Part of: flutter/flutter#29300
This PR add an option to set the background color of the Android webview.
Original PR :
#3431
It fixes this issue :
flutter/flutter#29300
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto 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.