From 9effac982493b89b21d6eee97c5854c215aee72e Mon Sep 17 00:00:00 2001 From: OleksandrSobol Date: Thu, 28 Jan 2021 21:36:12 +0200 Subject: [PATCH] CAKE-252 | UI fixed for buttons on the backup_page.dart, edit_backup_password_page.dart and new_wallet_type_page.dart --- lib/src/screens/backup/backup_page.dart | 8 +- .../backup/edit_backup_password_page.dart | 4 +- .../new_wallet/new_wallet_type_page.dart | 81 +++++++++---------- 3 files changed, 45 insertions(+), 48 deletions(-) diff --git a/lib/src/screens/backup/backup_page.dart b/lib/src/screens/backup/backup_page.dart index f17bc5cff..5380cf935 100644 --- a/lib/src/screens/backup/backup_page.dart +++ b/lib/src/screens/backup/backup_page.dart @@ -35,7 +35,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( @@ -78,9 +78,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_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, ), ); }