I have an exam with a timer inside a widget I want to prevent users from reloading or show a confirmation dialog
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');
});