diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index 49bcb368d..58ef36797 100644 --- a/lib/src/screens/wallet_list/wallet_list_page.dart +++ b/lib/src/screens/wallet_list/wallet_list_page.dart @@ -47,16 +47,13 @@ class WalletListBodyState extends State { @override Widget build(BuildContext context) { final newWalletImage = Image.asset('assets/images/new_wallet.png', - height: 12, - width: 12, - color: Colors.white); + height: 12, width: 12, color: Colors.white); final restoreWalletImage = Image.asset('assets/images/restore_wallet.png', height: 12, width: 12, color: Theme.of(context).primaryTextTheme.title.color); - return SafeArea( - child: Container( + return Container( padding: EdgeInsets.only(top: 16), child: ScrollableWithBottomSection( contentPadding: EdgeInsets.only(bottom: 20), @@ -83,18 +80,24 @@ class WalletListBodyState extends State { } final confirmed = await showPopUp( - context: context, - builder: (dialogContext) { - return AlertWithTwoActions( - alertTitle: S.of(context).change_wallet_alert_title, - alertContent: S.of(context).change_wallet_alert_content(wallet.name), - leftButtonText: S.of(context).cancel, - rightButtonText: S.of(context).change, - actionLeftButton: () => - Navigator.of(context).pop(false), - actionRightButton: () => - Navigator.of(context).pop(true)); - }) ?? false; + context: context, + builder: (dialogContext) { + return AlertWithTwoActions( + alertTitle: S + .of(context) + .change_wallet_alert_title, + alertContent: S + .of(context) + .change_wallet_alert_content( + wallet.name), + leftButtonText: S.of(context).cancel, + rightButtonText: S.of(context).change, + actionLeftButton: () => + Navigator.of(context).pop(false), + actionRightButton: () => + Navigator.of(context).pop(true)); + }) ?? + false; if (confirmed) { await _loadWallet(wallet); @@ -161,10 +164,12 @@ class WalletListBodyState extends State { }), ), ), - bottomSectionPadding: EdgeInsets.only(bottom: 24, right: 24, left: 24), + bottomSectionPadding: + EdgeInsets.only(bottom: 24, right: 24, left: 24), bottomSection: Column(children: [ PrimaryImageButton( - onPressed: () => Navigator.of(context).pushNamed(Routes.newWalletType), + onPressed: () => + Navigator.of(context).pushNamed(Routes.newWalletType), image: newWalletImage, text: S.of(context).wallet_list_create_new_wallet, color: Theme.of(context).accentTextTheme.body2.color, @@ -179,7 +184,7 @@ class WalletListBodyState extends State { color: Theme.of(context).accentTextTheme.caption.color, textColor: Theme.of(context).primaryTextTheme.title.color) ])), - )); + ); } Image _imageFor({WalletType type}) { @@ -239,17 +244,17 @@ class WalletListBodyState extends State { Future _generateNewWallet() async { try { changeProcessText(S.of(context).creating_new_wallet); - await widget.walletListViewModel.walletNewVM.create(options: 'English'); // FIXME: Unnamed constant + await widget.walletListViewModel.walletNewVM + .create(options: 'English'); // FIXME: Unnamed constant hideProgressText(); await Navigator.of(context).pushNamed(Routes.preSeed); - } catch(e) { + } catch (e) { changeProcessText(S.of(context).creating_new_wallet_error(e.toString())); } } void changeProcessText(String text) { - _progressBar = createBar(text, duration: null) - ..show(context); + _progressBar = createBar(text, duration: null)..show(context); } void hideProgressText() { diff --git a/lib/src/screens/welcome/welcome_page.dart b/lib/src/screens/welcome/welcome_page.dart index c8a821539..7afbb60c2 100644 --- a/lib/src/screens/welcome/welcome_page.dart +++ b/lib/src/screens/welcome/welcome_page.dart @@ -17,7 +17,7 @@ class WelcomePage extends BasePage { .of(context) .backgroundColor, resizeToAvoidBottomPadding: false, - body: SafeArea(child: body(context))); + body: body(context)); } @override @@ -43,8 +43,9 @@ class WelcomePage extends BasePage { .color); return WillPopScope(onWillPop: () async => false, child: Container( - padding: EdgeInsets.all(24), + padding: EdgeInsets.only(top: 64, bottom: 24, left: 24, right: 24), child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Flexible( flex: 2,