CAKE-252 | UI fixed for buttons on the backup_page.dart, edit_backup_password_page.dart and new_wallet_type_page.dart

This commit is contained in:
OleksandrSobol 2021-01-28 21:36:12 +02:00
parent 0774ce18ca
commit 9effac9824
3 changed files with 45 additions and 48 deletions

View file

@ -35,7 +35,7 @@ class BackupPage extends BasePage {
children: [ children: [
Center( Center(
child: Container( child: Container(
padding: EdgeInsets.only(left: 20, right: 20), padding: EdgeInsets.only(left: 24, right: 24),
height: 300, height: 300,
child: Column(children: [ child: Column(children: [
Text( Text(
@ -78,9 +78,9 @@ class BackupPage extends BasePage {
text: S.of(context).export_backup, text: S.of(context).export_backup,
color: Theme.of(context).accentTextTheme.body2.color, color: Theme.of(context).accentTextTheme.body2.color,
textColor: Colors.white)), textColor: Colors.white)),
bottom: 30, bottom: 24,
left: 20, left: 24,
right: 20, right: 24,
) )
], ],
); );

View file

@ -25,7 +25,7 @@ class EditBackupPasswordPage extends BasePage {
@override @override
Widget body(BuildContext context) { Widget body(BuildContext context) {
return Padding( return Padding(
padding: EdgeInsets.only(left: 20, right: 20), padding: EdgeInsets.only(left: 24, right: 24),
child: Stack( child: Stack(
fit: StackFit.expand, fit: StackFit.expand,
children: [ children: [
@ -48,7 +48,7 @@ class EditBackupPasswordPage extends BasePage {
color: Theme.of(context).accentTextTheme.body2.color, color: Theme.of(context).accentTextTheme.body2.color,
textColor: Colors.white, textColor: Colors.white,
isDisabled: !editBackupPasswordViewModel.canSave)), isDisabled: !editBackupPasswordViewModel.canSave)),
bottom: 30, bottom: 24,
left: 0, left: 0,
right: 0) right: 0)
], ],

View file

@ -75,49 +75,46 @@ class WalletTypeFormState extends State<WalletTypeForm> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return ScrollableWithBottomSection(
padding: EdgeInsets.only(top: 24, bottom: 24), contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
child: ScrollableWithBottomSection( content: Column(
contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24), crossAxisAlignment: CrossAxisAlignment.center,
content: Column( children: <Widget>[
crossAxisAlignment: CrossAxisAlignment.center, Padding(
children: <Widget>[ padding: EdgeInsets.only(left: 12, right: 12),
Padding( child: AspectRatio(
padding: EdgeInsets.only(left: 12, right: 12), aspectRatio: aspectRatioImage,
child: AspectRatio( child:
aspectRatio: aspectRatioImage, FittedBox(child: widget.walletImage, fit: BoxFit.fill)),
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), ...types.map((type) => Padding(
child: Text( padding: EdgeInsets.only(top: 24),
S.of(context).choose_wallet_currency, child: SelectButton(
textAlign: TextAlign.center, image: _iconFor(type),
style: TextStyle( text: walletTypeToDisplayName(type),
fontSize: 16, isSelected: selected == type,
fontWeight: FontWeight.w500, onTap: () => setState(() => selected = type)),
color: Theme.of(context).primaryTextTheme.title.color), ))
), ],
), ),
...types.map((type) => Padding( bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
padding: EdgeInsets.only(top: 24), bottomSection: PrimaryButton(
child: SelectButton( onPressed: () => onTypeSelected(),
image: _iconFor(type), text: S.of(context).seed_language_next,
text: walletTypeToDisplayName(type), color: Theme.of(context).accentTextTheme.body2.color,
isSelected: selected == type, textColor: Colors.white,
onTap: () => setState(() => selected = type)), isDisabled: selected == null,
))
],
),
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,
),
), ),
); );
} }