From 8aa636a4e8b6eacf4b8a0ba1ddfbe6e6e9f92065 Mon Sep 17 00:00:00 2001 From: OleksandrSobol Date: Fri, 26 Mar 2021 13:29:43 +0200 Subject: [PATCH] CAKE-290 | applied WillPopScope for call of AuthPage with instanceName in the router.dart --- lib/router.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/router.dart b/lib/router.dart index 9f5f27584..0474758e3 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -60,6 +60,7 @@ import 'package:cake_wallet/src/screens/send/send_template_page.dart'; import 'package:cake_wallet/src/screens/exchange/exchange_template_page.dart'; import 'package:cake_wallet/src/screens/exchange_trade/exchange_confirm_page.dart'; import 'package:cake_wallet/src/screens/exchange_trade/exchange_trade_page.dart'; +import 'package:flutter/services.dart'; import 'package:hive/hive.dart'; Route createRoute(RouteSettings settings) { @@ -250,7 +251,10 @@ Route createRoute(RouteSettings settings) { case Routes.login: return CupertinoPageRoute( - builder: (context) => getIt.get(instanceName: 'login'), + builder: (context) => WillPopScope( + child: getIt.get(instanceName: 'login'), + onWillPop: () => + SystemChannels.platform.invokeMethod('SystemNavigator.pop')), fullscreenDialog: true); case Routes.accountCreation: