fluttercommunity / fluttercommunity/flutter_webview_plugin
onStateChanged listener listening only once
- 主要言語
- Java
- スター
- 1.5k
- フォーク
- 938
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
flutter_webview_plugin: ^0.3.8
I open the webview when clicking on a button using:
```
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) => WebviewScaffold(
url: 'https://google.com',
appBar: AppBar(
title: Text('WebView'),
),
),))
```
In my build method I have
```
flutterWebviewPlugin.onStateChanged.listen(
(WebViewStateChanged viewState) async {
if (viewState.type == WebViewState.finishLoad) {
print('abc');
}
});
```
The onStateChanged works perfectly if I just go from one page to the next but If I hit the back Arrow in the AppBar and again click on the button to open webview, the breakpoint hits 'flutterWebviewPlugin.onStateChanged.listen' line in the build method but it doesn't go inside the onStateChanged.listen function and doesn't print abc.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。