-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[webview_flutter_android][webview_flutter_wkwebview] Fixes bug where PlatformWebViewWidget
doesn't rebuild when the controller changes
#4533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…controller changes
PlatformWebViewWidget
doesn't rebuild when the controller changes
PlatformWebViewWidget
doesn't rebuild when the controller changesPlatformWebViewWidget
doesn't rebuild when the controller changes
mvanbeusekom
approved these changes
Jul 21, 2023
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
stuartmorgan-g
approved these changes
Jul 24, 2023
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
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 25, 2023
…g where `PlatformWebViewWidget` doesn't rebuild when the controller changes (flutter/packages#4533)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 25, 2023
…g where `PlatformWebViewWidget` doesn't rebuild when the controller changes (flutter/packages#4533)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 25, 2023
…g where `PlatformWebViewWidget` doesn't rebuild when the controller changes (flutter/packages#4533)
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jul 25, 2023
flutter/packages@8028caf...406eac1 2023-07-25 [email protected] Roll Flutter from d7ed5dc to 9def8f6 (21 revisions) (flutter/packages#4561) 2023-07-25 [email protected] [webview_flutter_android][webview_flutter_wkwebview] Fixes bug where `PlatformWebViewWidget` doesn't rebuild when the controller changes (flutter/packages#4533) 2023-07-24 [email protected] [ci] Enable Android emulator-based tests (flutter/packages#4494) 2023-07-24 [email protected] [google_maps_flutter_web] Options to disable tilt controls and configure gesture handling (flutter/packages#3258) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
11 tasks
LouiseHsu
pushed a commit
to LouiseHsu/flutter
that referenced
this pull request
Jul 31, 2023
flutter/packages@8028caf...406eac1 2023-07-25 [email protected] Roll Flutter from d7ed5dc to 9def8f6 (21 revisions) (flutter/packages#4561) 2023-07-25 [email protected] [webview_flutter_android][webview_flutter_wkwebview] Fixes bug where `PlatformWebViewWidget` doesn't rebuild when the controller changes (flutter/packages#4533) 2023-07-24 [email protected] [ci] Enable Android emulator-based tests (flutter/packages#4494) 2023-07-24 [email protected] [google_maps_flutter_web] Options to disable tilt controls and configure gesture handling (flutter/packages#3258) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
vashworth
pushed a commit
to vashworth/flutter
that referenced
this pull request
Aug 2, 2023
flutter/packages@8028caf...406eac1 2023-07-25 [email protected] Roll Flutter from d7ed5dc to 9def8f6 (21 revisions) (flutter/packages#4561) 2023-07-25 [email protected] [webview_flutter_android][webview_flutter_wkwebview] Fixes bug where `PlatformWebViewWidget` doesn't rebuild when the controller changes (flutter/packages#4533) 2023-07-24 [email protected] [ci] Enable Android emulator-based tests (flutter/packages#4494) 2023-07-24 [email protected] [google_maps_flutter_web] Options to disable tilt controls and configure gesture handling (flutter/packages#3258) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
11 tasks
2 tasks
11 tasks
auto-submit bot
pushed a commit
that referenced
this pull request
Aug 9, 2023
…uild bug caused by key type (#4667) It looks like the wrong key was used in #4533. The `ObjectKey` uses `identical` for comparison while `ValueKey` uses `==`, which is what was intended. This just switches the key type on both platforms. Fixes flutter/flutter#131697 Fixes flutter/flutter#132143
tony-hristov
pushed a commit
to tony-hristov/webview_flutter
that referenced
this pull request
Sep 12, 2023
…uild bug caused by key type (#4667) It looks like the wrong key was used in flutter/packages#4533. The `ObjectKey` uses `identical` for comparison while `ValueKey` uses `==`, which is what was intended. This just switches the key type on both platforms. Fixes flutter/flutter#131697 Fixes flutter/flutter#132143
Jyndigo
pushed a commit
to uesp/wkwebview_flutter
that referenced
this pull request
Jun 24, 2025
…uild bug caused by key type (#4667) It looks like the wrong key was used in flutter/packages#4533. The `ObjectKey` uses `identical` for comparison while `ValueKey` uses `==`, which is what was intended. This just switches the key type on both platforms. Fixes flutter/flutter#131697 Fixes flutter/flutter#132143
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
autosubmit
Merge PR when tree becomes green via auto submit App
p: webview_flutter
platform-android
platform-ios
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a scenario where a
WebViewWidget
was updated with a newWebViewController
, the nativeWebView
from the new controller would not be shown. e.g.From testing, the
WebViewWidget
would continue showing the originalWebViewController
and eventually freeze the PlatformView preventing button presses.This is because the PlatformView widget only creates the native PlatformView once and doesn't recreate it when the creation parameters change (as expected). This adds a default
key
to thePlatformWebViewWidget
that is used to indicate when the underlying widget needs to be removed and recreated. See https://api.flutter.dev/flutter/widgets/Widget/key.htmlPre-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.