move super.dispose ahead in async dispose

This commit is contained in:
rustdesk
2023-06-30 14:01:12 +08:00
parent 907a62a586
commit 79f8727c69
2 changed files with 4 additions and 2 deletions

View File

@@ -76,6 +76,8 @@ class _RemotePageState extends State<RemotePage> {
@override
Future<void> dispose() async {
// https://github.com/flutter/flutter/issues/64935
super.dispose();
gFFI.dialogManager.hideMobileActionsOverlay();
gFFI.inputModel.listenToMouse(false);
await gFFI.invokeMethod("enable_soft_keyboard", true);
@@ -89,7 +91,6 @@ class _RemotePageState extends State<RemotePage> {
await Wakelock.disable();
await keyboardSubscription.cancel();
removeSharedStates(widget.id);
super.dispose();
}
void onSoftKeyboardChanged(bool visible) {