move super.dispose ahead in async dispose
This commit is contained in:
parent
907a62a586
commit
79f8727c69
@ -206,6 +206,8 @@ class _RemotePageState extends State<RemotePage>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> dispose() async {
|
Future<void> dispose() async {
|
||||||
|
// https://github.com/flutter/flutter/issues/64935
|
||||||
|
super.dispose();
|
||||||
debugPrint("REMOTE PAGE dispose ${widget.id}");
|
debugPrint("REMOTE PAGE dispose ${widget.id}");
|
||||||
if (useTextureRender) {
|
if (useTextureRender) {
|
||||||
platformFFI.registerTexture(sessionId, 0);
|
platformFFI.registerTexture(sessionId, 0);
|
||||||
@ -229,7 +231,6 @@ class _RemotePageState extends State<RemotePage>
|
|||||||
}
|
}
|
||||||
await Get.delete<FFI>(tag: widget.id);
|
await Get.delete<FFI>(tag: widget.id);
|
||||||
removeSharedStates(widget.id);
|
removeSharedStates(widget.id);
|
||||||
super.dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildBody(BuildContext context) {
|
Widget buildBody(BuildContext context) {
|
||||||
|
@ -76,6 +76,8 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> dispose() async {
|
Future<void> dispose() async {
|
||||||
|
// https://github.com/flutter/flutter/issues/64935
|
||||||
|
super.dispose();
|
||||||
gFFI.dialogManager.hideMobileActionsOverlay();
|
gFFI.dialogManager.hideMobileActionsOverlay();
|
||||||
gFFI.inputModel.listenToMouse(false);
|
gFFI.inputModel.listenToMouse(false);
|
||||||
await gFFI.invokeMethod("enable_soft_keyboard", true);
|
await gFFI.invokeMethod("enable_soft_keyboard", true);
|
||||||
@ -89,7 +91,6 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
await Wakelock.disable();
|
await Wakelock.disable();
|
||||||
await keyboardSubscription.cancel();
|
await keyboardSubscription.cancel();
|
||||||
removeSharedStates(widget.id);
|
removeSharedStates(widget.id);
|
||||||
super.dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onSoftKeyboardChanged(bool visible) {
|
void onSoftKeyboardChanged(bool visible) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user