fix unregister texture condition

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow 2023-08-16 21:52:03 +08:00
parent fad88c2718
commit 9adac5686b

View File

@ -207,7 +207,7 @@ class _RemotePageState extends State<RemotePage>
// https://github.com/flutter/flutter/issues/64935
super.dispose();
debugPrint("REMOTE PAGE dispose session $sessionId ${widget.id}");
await _renderTexture.destroy(widget.tabWindowId != null);
await _renderTexture.destroy(closeSession);
// ensure we leave this session, this is a double check
bind.sessionEnterOrLeave(sessionId: sessionId, enter: false);
DesktopMultiWindow.removeListener(this);