Skip to content
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

Make WebViewStateChanged's navigationType nullable #907

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

micaelcid
Copy link

@micaelcid micaelcid commented Jun 7, 2021

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. The WebviewScaffold with hidden was in a infinite "Waiting..." state.

@micaelcid
Copy link
Author

Please, take a look @charafau

@pushpendraKh
Copy link

It is happening on iPhone also. Web view state is not changing (keeps on shouldStart)

Copy link

@sachin-dahal sachin-dahal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helpful one and thanks for the help @micaelcid

Copy link

@sachin-dahal sachin-dahal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolves #910 about the onStateChanged stream is not working

@shirakiya
Copy link

@mainteiner
Hi! I'm having trouble getting onStateChanged to work in my app on Android. When do you plan to merge this pull request?

@augustorsouza
Copy link

Hello guys, could you please merge this PR 🙏 ?

@micaelcid
Copy link
Author

@charafau @slightfoot @lejard-h can you guys please take a look?

@augustorsouza
Copy link

augustorsouza commented Aug 31, 2021

@ramah @jonasfranz @themisir could you please take a look?

@themisir
Copy link
Contributor

themisir commented Aug 31, 2021

@augustorsouza I don't have write permissions to the repository. I would suggest using dependency from git source until the changes are released.

@furkeen
Copy link

furkeen commented Sep 4, 2021

@micaelcid thank you so much. I spent lots of time fixing problem, and finally, find your PR.

@ramah
Copy link

ramah commented Sep 4, 2021

@augustorsouza Hello.
Sorry for the delay of my response. Hope you found what you needed.

@micaelcid
Copy link
Author

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 😢

@petra-bios
Copy link

does anyone have forks with this fix and migrated to V2 embedding?

@tulioccalazans
Copy link

tulioccalazans commented Jul 27, 2022

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!

harsh-signzy added a commit to harsh-signzy/webview_flutter_plugin that referenced this pull request Sep 27, 2022
@micaelcid
Copy link
Author

micaelcid commented May 12, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants