diff --git a/lib/src/screens/backup/backup_page.dart b/lib/src/screens/backup/backup_page.dart index 61dfe1b48..394ef92ba 100644 --- a/lib/src/screens/backup/backup_page.dart +++ b/lib/src/screens/backup/backup_page.dart @@ -39,7 +39,7 @@ class BackupPage extends BasePage { children: [ Center( child: Container( - padding: EdgeInsets.only(left: 20, right: 20), + padding: EdgeInsets.only(left: 24, right: 24), height: 300, child: Column(children: [ Text( @@ -82,9 +82,9 @@ class BackupPage extends BasePage { text: S.of(context).export_backup, color: Theme.of(context).accentTextTheme.body2.color, textColor: Colors.white)), - bottom: 30, - left: 20, - right: 20, + bottom: 24, + left: 24, + right: 24, ) ], ); diff --git a/lib/src/screens/backup/edit_backup_password_page.dart b/lib/src/screens/backup/edit_backup_password_page.dart index 4c442bc31..996532654 100644 --- a/lib/src/screens/backup/edit_backup_password_page.dart +++ b/lib/src/screens/backup/edit_backup_password_page.dart @@ -25,7 +25,7 @@ class EditBackupPasswordPage extends BasePage { @override Widget body(BuildContext context) { return Padding( - padding: EdgeInsets.only(left: 20, right: 20), + padding: EdgeInsets.only(left: 24, right: 24), child: Stack( fit: StackFit.expand, children: [ @@ -48,7 +48,7 @@ class EditBackupPasswordPage extends BasePage { color: Theme.of(context).accentTextTheme.body2.color, textColor: Colors.white, isDisabled: !editBackupPasswordViewModel.canSave)), - bottom: 30, + bottom: 24, left: 0, right: 0) ], diff --git a/lib/src/screens/new_wallet/new_wallet_page.dart b/lib/src/screens/new_wallet/new_wallet_page.dart index e6e1a958d..71197423a 100644 --- a/lib/src/screens/new_wallet/new_wallet_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_page.dart @@ -22,6 +22,7 @@ class NewWalletPage extends BasePage { final WalletNewVM _walletNewVM; final walletNameImage = Image.asset('assets/images/wallet_name.png'); + final walletNameLightImage = Image.asset('assets/images/wallet_name_light.png'); diff --git a/lib/src/screens/new_wallet/new_wallet_type_page.dart b/lib/src/screens/new_wallet/new_wallet_type_page.dart index 76415f9dc..3e74c3855 100644 --- a/lib/src/screens/new_wallet/new_wallet_type_page.dart +++ b/lib/src/screens/new_wallet/new_wallet_type_page.dart @@ -75,49 +75,46 @@ class WalletTypeFormState extends State { @override Widget build(BuildContext context) { - return Container( - padding: EdgeInsets.only(top: 24, bottom: 24), - child: ScrollableWithBottomSection( - contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24), - content: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.only(left: 12, right: 12), - child: AspectRatio( - aspectRatio: aspectRatioImage, - child: - FittedBox(child: widget.walletImage, fit: BoxFit.fill)), + return ScrollableWithBottomSection( + contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24), + content: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: AspectRatio( + aspectRatio: aspectRatioImage, + child: + FittedBox(child: widget.walletImage, fit: BoxFit.fill)), + ), + Padding( + padding: EdgeInsets.only(top: 48), + child: Text( + S.of(context).choose_wallet_currency, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Theme.of(context).primaryTextTheme.title.color), ), - Padding( - padding: EdgeInsets.only(top: 48), - child: Text( - S.of(context).choose_wallet_currency, - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Theme.of(context).primaryTextTheme.title.color), - ), - ), - ...types.map((type) => Padding( - padding: EdgeInsets.only(top: 24), - child: SelectButton( - image: _iconFor(type), - text: walletTypeToDisplayName(type), - isSelected: selected == type, - onTap: () => setState(() => selected = type)), - )) - ], - ), - bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24), - bottomSection: PrimaryButton( - onPressed: () => onTypeSelected(), - text: S.of(context).seed_language_next, - color: Theme.of(context).accentTextTheme.body2.color, - textColor: Colors.white, - isDisabled: selected == null, - ), + ), + ...types.map((type) => Padding( + padding: EdgeInsets.only(top: 24), + child: SelectButton( + image: _iconFor(type), + text: walletTypeToDisplayName(type), + isSelected: selected == type, + onTap: () => setState(() => selected = type)), + )) + ], + ), + bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24), + bottomSection: PrimaryButton( + onPressed: () => onTypeSelected(), + text: S.of(context).seed_language_next, + color: Theme.of(context).accentTextTheme.body2.color, + textColor: Colors.white, + isDisabled: selected == null, ), ); } diff --git a/lib/src/screens/restore/restore_from_backup_page.dart b/lib/src/screens/restore/restore_from_backup_page.dart index dcc76cb6c..3cb7f2d55 100644 --- a/lib/src/screens/restore/restore_from_backup_page.dart +++ b/lib/src/screens/restore/restore_from_backup_page.dart @@ -40,7 +40,7 @@ class RestoreFromBackupPage extends BasePage { }); return Container( - padding: EdgeInsets.only(bottom: 30, left: 25, right: 25), + padding: EdgeInsets.only(bottom: 24, left: 24, right: 24), child: Column(children: [ Expanded( child: Container( diff --git a/lib/src/screens/restore/restore_wallet_from_seed_page.dart b/lib/src/screens/restore/restore_wallet_from_seed_page.dart index 6c133ad5e..d81c2eb28 100644 --- a/lib/src/screens/restore/restore_wallet_from_seed_page.dart +++ b/lib/src/screens/restore/restore_wallet_from_seed_page.dart @@ -82,7 +82,7 @@ class RestoreWalletFromSeedPage extends BasePage { activeDotColor: Theme.of(context).hintColor), )), Padding( - padding: EdgeInsets.only(top: 20, bottom: 40, left: 25, right: 25), + padding: EdgeInsets.only(top: 20, bottom: 24, left: 24, right: 24), child: PrimaryButton( text: S.of(context).restore_recover, isDisabled: false, @@ -158,7 +158,7 @@ class _RestoreFromSeedFormState extends State { onTap: () => SystemChannels.textInput.invokeMethod('TextInput.hide'), child: Container( - padding: EdgeInsets.only(left: 25, right: 25), + padding: EdgeInsets.only(left: 24, right: 24), // color: Colors.blue, // height: 300, child: Column(children: [ diff --git a/lib/src/screens/restore/wallet_restore_from_keys_form.dart b/lib/src/screens/restore/wallet_restore_from_keys_form.dart index ade173d6f..c987a5a5b 100644 --- a/lib/src/screens/restore/wallet_restore_from_keys_form.dart +++ b/lib/src/screens/restore/wallet_restore_from_keys_form.dart @@ -44,7 +44,7 @@ class WalletRestoreFromKeysFromState extends State { @override Widget build(BuildContext context) { return Container( - padding: EdgeInsets.only(left: 25, right: 25), + padding: EdgeInsets.only(left: 24, right: 24), child: Form( key: formKey, child: Column(children: [ diff --git a/lib/src/screens/restore/wallet_restore_from_seed_form.dart b/lib/src/screens/restore/wallet_restore_from_seed_form.dart index e94f63bf0..9955750ab 100644 --- a/lib/src/screens/restore/wallet_restore_from_seed_form.dart +++ b/lib/src/screens/restore/wallet_restore_from_seed_form.dart @@ -49,7 +49,7 @@ class WalletRestoreFromSeedFormState extends State { @override Widget build(BuildContext context) { return Container( - padding: EdgeInsets.only(left: 25, right: 25), + padding: EdgeInsets.only(left: 24, right: 24), child: Column(children: [ SeedWidget( key: seedWidgetStateKey, language: language, type: widget.type), diff --git a/lib/src/screens/restore/wallet_restore_page.dart b/lib/src/screens/restore/wallet_restore_page.dart index adae48c89..1f34d4a79 100644 --- a/lib/src/screens/restore/wallet_restore_page.dart +++ b/lib/src/screens/restore/wallet_restore_page.dart @@ -130,7 +130,7 @@ class WalletRestorePage extends BasePage { activeDotColor: Theme.of(context).hintColor), )), Padding( - padding: EdgeInsets.only(top: 20, bottom: 40, left: 25, right: 25), + padding: EdgeInsets.only(top: 20, bottom: 24, left: 24, right: 24), child: Observer( builder: (context) { return LoadingPrimaryButton( diff --git a/lib/src/screens/wallet_list/wallet_list_page.dart b/lib/src/screens/wallet_list/wallet_list_page.dart index de0addd1d..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,9 +164,12 @@ class WalletListBodyState extends State { }), ), ), + 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, @@ -178,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}) { @@ -238,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,