Skip to content

WebViewState finishLoad calling multiple time #196

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

Open
yeahia2508 opened this issue Sep 27, 2018 · 0 comments
Open

WebViewState finishLoad calling multiple time #196

yeahia2508 opened this issue Sep 27, 2018 · 0 comments

Comments

@yeahia2508
Copy link

Based on finish load I want to save this url in database. But finishLoad calling multiple time. Why it's behavior is like this?

my code:

  _webviewPlugin.onStateChanged.listen((WebViewStateChanged state) async {
  if (mounted) {

    if(WebViewState.startLoad == state.type){

      setState(() {
        isProgress = true;
      });

    }else if(WebViewState.finishLoad == state.type){
      isProgress = false;
      await database.saveUser(new History(widget.uri.toString(), "Hello title"));

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

No branches or pull requests

2 participants