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