Changes for buy page for bitcoin and litecoin. Added listeners for notifications from resume and launch.

This commit is contained in:
M
2021-06-08 23:06:22 +03:00
parent 6268cf3788
commit 81b34a30e7
5 changed files with 35 additions and 29 deletions
+1 -3
View File
@@ -73,9 +73,7 @@ class PreOrderPage extends BasePage {
@override
Widget trailing(context) => TrailButton(
caption: S.of(context).clear,
onPressed: () {
buyViewModel.reset();
});
onPressed: () => buyViewModel.reset());
@override
Widget body(BuildContext context) {
@@ -180,10 +180,7 @@ class DashboardPage extends BasePage {
final walletType = walletViewModel.type;
switch (walletType) {
case WalletType.bitcoin:
Navigator.of(context).pushNamed(Routes.preOrder);
break;
default:
case WalletType.monero:
await showPopUp<void>(
context: context,
builder: (BuildContext context) {
@@ -194,6 +191,9 @@ class DashboardPage extends BasePage {
buttonAction: () => Navigator.of(context).pop());
});
break;
default:
Navigator.of(context).pushNamed(Routes.preOrder);
break;
}
}
}