From 89d855d085719e8766b81a7c23c23bf02ed8f23d Mon Sep 17 00:00:00 2001 From: fufesou <13586388+fufesou@users.noreply.github.com> Date: Wed, 29 May 2024 08:16:36 +0800 Subject: [PATCH] fix: deactive widget ancester (#8187) Signed-off-by: fufesou --- flutter/lib/desktop/pages/remote_page.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flutter/lib/desktop/pages/remote_page.dart b/flutter/lib/desktop/pages/remote_page.dart index 7d4773a32..8bd3b0b21 100644 --- a/flutter/lib/desktop/pages/remote_page.dart +++ b/flutter/lib/desktop/pages/remote_page.dart @@ -455,9 +455,8 @@ class _RemotePageState extends State }, onExit: (evt) { if (!isWeb) bind.hostStopSystemKeyPropagate(stopped: true); }, child: LayoutBuilder(builder: (context, constraints) { - Future.delayed(Duration.zero, () { - Provider.of(context, listen: false).updateViewStyle(); - }); + final c = Provider.of(context, listen: false); + Future.delayed(Duration.zero, () => c.updateViewStyle()); final peerDisplay = CurrentDisplayState.find(widget.id); return Obx( () => _ffi.ffiModel.pi.isSet.isFalse