From 0797f5986d039e7d12fe72193cd7d5b759044a41 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Thu, 13 May 2021 22:52:19 +0800 Subject: [PATCH] flutter: Call SystemNavigator.pop only on Android (cherry picked from commit b7098cd2b959750e9ffe6dabc0efb6bd4c658ff2) --- src/ui/flutter_app/lib/widgets/game_settings_page.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui/flutter_app/lib/widgets/game_settings_page.dart b/src/ui/flutter_app/lib/widgets/game_settings_page.dart index 27b6dcd6..d2da085c 100644 --- a/src/ui/flutter_app/lib/widgets/game_settings_page.dart +++ b/src/ui/flutter_app/lib/widgets/game_settings_page.dart @@ -80,7 +80,9 @@ class _GameSettingsPageState extends State { if (snapshot.data == 0) { _restore(); - SystemChannels.platform.invokeMethod('SystemNavigator.pop'); + if (Platform.isAndroid) { + SystemChannels.platform.invokeMethod('SystemNavigator.pop'); + } else {} } return Container(