fluttercommunity / fluttercommunity/flutter_webview_plugin

flutter_webview_plugin not switching when stored inside of indexed stack

オープン
#844 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
1.5k
フォーク
938
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

IndexedStack 内で flutter_webview_plugin を下部ナビゲーションバーとともに使用して報告された挙動を再現し、issue およびリンクされた Stack Overflow の例で説明されている配列ベースのタブ構成と比較する。タブの状態を保持したまま WebView から切り替えられるかを確認する。完了条件は、他のタブをリセットせずにナビゲーションによって表示ウィジェットが変更されること。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
flutter
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。