forked from leanflutter/window_manager
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Code that used to work fine now doesn't work after updating to Flutter 3.9.2, running in Windows.
@override
void initState() {
WindowManagerPlus.current.addListener(this);
// Add this line to override the default close handler
Future(() => WindowManagerPlus.current.setPreventClose(true));
}
@override
void onWindowClose([int? windowId]) async {
count++;
print('onWindowClose() : $count');
...
}
The onWindowClose() function is called an infinite number of times on close event, running in Windows.
Connecting to VM Service at ws://127.0.0.1:57429/LyB87Q0gVDc=/ws
Connected to the VM Service.
onWindowClose() : 1
onWindowClose() : 2
onWindowClose() : 3
onWindowClose() : 4
onWindowClose() : 5
onWindowClose() : 6
onWindowClose() : 7
...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels