I have an exam with a timer inside a widget I want to prevent users from reloading or show a confirmation dialog
Asked
Active
Viewed 1,154 times
0
-
Hi Abdelrahman have you get any solution to stop the refresh buttton – Deepak Rana Feb 11 '21 at 07:38
-
I didn't find a solution but I found that I can excute some code before reloading so I saved the data on shared pref before reloading – Abdelrahman Tareq Feb 12 '21 at 05:58
1 Answers
0
I didn't find a solution but I found that I can excute some code before reloading:
import 'dart:html' as html;
html.window.onUnload.listen((event) async {
print('Reloaded');
});

Abdelrahman Tareq
- 1,874
- 3
- 17
- 32