fluttercommunity / fluttercommunity/flutter_webview_plugin

flutter_webview_plugin not switching when stored inside of indexed stack

Offen
#844 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
1.5k
Forks
938
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I am new to flutter and am developing a flutter app that has the ability to switch between multiple tabs where each tab is its own separate widget. To accomplish this, I am using a bottom navigation bar. I also need the widgets to not be reset every time the tab gets switched, so I am storing each widget in an indexedStack instead of an array. My issue is that when I run the app, the webview (from flutter_webview_plugin, NOT webview_flutter) will just stay on the screen and I cannot switch out of it. Switching between all other widgets works fine. I can still press buttons on the bottom navigation bar, so it will have a different button highlighted for one of the other widgets, but still be on the webview. I can still use the webview when it is like this. I don't have this issue when I just use an array, but the widgets reset themselves each time a new one is selected, which is not my desired behavior. Below is how I am switching between the tabs.

The code is here:
https://stackoverflow.com/questions/64360212/flutter-webview-plugin-not-switching-when-stored-inside-of-indexed-stack

What can I do to get my app to properly switch in and out of the widget that displays the webview? If I shouldn't use an indexedStack, what should I use instead so the widgets don't reset every time the tab gets switched?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.