fluttercommunity / fluttercommunity/flutter_webview_plugin

WebViewState finishLoad calling multiple time

未关闭
#196 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug not enough info
主要语言
Java
星标
1.5k
派生
936
PR 合并指标
30 天内没有已合并 PR

描述

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"));

}
}
});

贡献指南

这个仓库没有索引到贡献指南

调研方向

从报告中所示的 _webviewPlugin.onStateChanged listener 和 WebViewState.finishLoad 事件路径开始。使用提供的数据库保存操作重现重复的 finishLoad 通知,然后记录事件生命周期以及应保存 URL 的条件。

由索引模型根据 Issue 内容生成。

评估

技术栈
dart, flutter
领域
mobile
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。