【发布时间】:2021-01-21 11:49:59
【问题描述】:
我在小部件中使用计时器进行考试,我想防止用户重新加载或显示确认对话框
【问题讨论】:
-
嗨,Abdelrahman,你有什么办法可以停止刷新按钮
-
我没有找到解决方案,但我发现我可以在重新加载之前执行一些代码,所以我在重新加载之前将数据保存在共享首选项中
标签: flutter-web
我在小部件中使用计时器进行考试,我想防止用户重新加载或显示确认对话框
【问题讨论】:
标签: flutter-web
我没有找到解决办法,但我发现我可以在重新加载之前执行一些代码:
import 'dart:html' as html;
html.window.onUnload.listen((event) async {
print('Reloaded');
});
【讨论】: