disable wakelock when minisized

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-04-30 20:05:56 +08:00
parent c7a6828307
commit 7bfe383e4a

View File

@ -177,6 +177,25 @@ class _RemotePageState extends State<RemotePage>
if (Platform.isWindows) {
_isWindowBlur = false;
}
if (!Platform.isLinux) {
Wakelock.enable();
}
}
@override
void onWindowMaximize() {
super.onWindowMinimize();
if (!Platform.isLinux) {
Wakelock.enable();
}
}
@override
void onWindowMinimize() {
super.onWindowMinimize();
if (!Platform.isLinux) {
Wakelock.disable();
}
}
@override