diff --git a/lib/src/screens/dashboard/widgets/present_receive_option_picker.dart b/lib/src/screens/dashboard/widgets/present_receive_option_picker.dart index c29442450..cf2ae7e3d 100644 --- a/lib/src/screens/dashboard/widgets/present_receive_option_picker.dart +++ b/lib/src/screens/dashboard/widgets/present_receive_option_picker.dart @@ -138,7 +138,7 @@ class PresentReceiveOptionPicker extends StatelessWidget { Container( margin: EdgeInsets.only(bottom: 40), child: InkWell( - onTap: () => Navigator.pop(context), + onTap: () => Navigator.pop(popUpContext), child: CircleAvatar( child: Icon( Icons.close, diff --git a/lib/src/screens/receive/anonpay_receive_page.dart b/lib/src/screens/receive/anonpay_receive_page.dart index 0c175eb19..c6ebb7211 100644 --- a/lib/src/screens/receive/anonpay_receive_page.dart +++ b/lib/src/screens/receive/anonpay_receive_page.dart @@ -9,6 +9,7 @@ import 'package:cake_wallet/src/screens/receive/widgets/anonpay_status_section.d import 'package:cake_wallet/src/screens/receive/widgets/qr_image.dart'; import 'package:cake_wallet/src/screens/receive/widgets/copy_link_item.dart'; import 'package:cake_wallet/themes/theme_base.dart'; +import 'package:cake_wallet/utils/device_info.dart'; import 'package:device_display_brightness/device_display_brightness.dart'; import 'package:flutter/material.dart'; import 'package:qr_flutter/qr_flutter.dart' as qr; @@ -48,8 +49,13 @@ class AnonPayReceivePage extends BasePage { child: ButtonTheme( minWidth: double.minPositive, child: TextButton( - onPressed: () => - Navigator.pushNamedAndRemoveUntil(context, Routes.dashboard, (route) => false), + onPressed: () { + if (DeviceInfo.instance.isDesktop) { + Navigator.popUntil(context, (route) => route.isFirst); + } else { + Navigator.pushNamedAndRemoveUntil(context, Routes.dashboard, (route) => false); + } + }, child: _backButton), ), );