From 4e102c7e6961156f0a1ad5cfaca87cc6cc765e54 Mon Sep 17 00:00:00 2001 From: tommyxchow Date: Tue, 1 Feb 2022 14:26:07 -0500 Subject: [PATCH] Temp fix for navigation pop causing freeze (#78) Caused by having a visbile webview while using Hybrid Composition. Temporary workaround is to add a slight delay. --- lib/screens/channel/video_chat.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/screens/channel/video_chat.dart b/lib/screens/channel/video_chat.dart index 6d3a40ee..c72319a4 100644 --- a/lib/screens/channel/video_chat.dart +++ b/lib/screens/channel/video_chat.dart @@ -199,7 +199,7 @@ class _VideoChatState extends State { SystemChrome.setEnabledSystemUIMode( SystemUiMode.manual, - overlays: [SystemUiOverlay.bottom, SystemUiOverlay.top], + overlays: SystemUiOverlay.values, ); return SafeArea( child: Column( @@ -228,9 +228,12 @@ class _VideoChatState extends State { void dispose() { _chatStore.dispose(); - SystemChrome.setEnabledSystemUIMode( - SystemUiMode.manual, - overlays: [SystemUiOverlay.bottom, SystemUiOverlay.top], + Future.delayed( + const Duration(milliseconds: 500), + () => SystemChrome.setEnabledSystemUIMode( + SystemUiMode.manual, + overlays: SystemUiOverlay.values, + ), ); super.dispose();