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: