flutter_webview_plugin
flutter_webview_plugin copied to clipboard
Make WebViewStateChanged's navigationType nullable
Description
After updating our app to use the latest null-safety release, we realized the onStateChanged
stream stopped working in our Android devices and emulators.
After a few hours of debugging with @wescosta, we realized navigationType
wasn't defined in the Map<String, dynamic>
- so making it nullable resolved the issue.
Now all our WebViews are back and working like they used to.
Even the
example
project wasn't working before these changes. TheWebviewScaffold
withhidden
was in a infinite "Waiting..." state.
Please, take a look @charafau
It is happening on iPhone also. Web view state is not changing (keeps on shouldStart
)
@mainteiner
Hi! I'm having trouble getting onStateChanged
to work in my app on Android. When do you plan to merge this pull request?
Hello guys, could you please merge this PR 🙏 ?
@charafau @slightfoot @lejard-h can you guys please take a look?
@ramah @jonasfranz @themisir could you please take a look?
@augustorsouza I don't have write permissions to the repository. I would suggest using dependency from git source until the changes are released.
@micaelcid thank you so much. I spent lots of time fixing problem, and finally, find your PR.
@augustorsouza Hello. Sorry for the delay of my response. Hope you found what you needed.
Hey, @charafau. Could you please review, merge and get this PR in the next release? It seems that plenty of people wants this fix too 😢
does anyone have forks with this fix and migrated to V2 embedding?
I was able to make this work by overriding the dependency and using this fork created by @micaelcid
Just add it on your pubspec.yaml
dependency_overrides:
flutter_webview_plugin: #https://github.com/fluttercommunity/flutter_webview_plugin/pull/907
git:
url: https://github.com/micaelcid/flutter_webview_plugin.git
ref: fix/webview-state-changed
Thanks @micaelcid! I hope this PR will be accepted soon!
Hey folks, just letting you know:
We're not using this fork anymore, although I'll leave this PR opened as a reference, in case anyone still needs it.
We fully migrated to https://pub.dev/packages/webview_flutter after they added file upload feature to the Android platform.