CWA-179 | added scroll to restore_option_page and to restore_wallet_options_page

This commit is contained in:
Oleksandr Sobol 2020-03-05 20:31:52 +02:00
parent c233d380ab
commit 6e7ba33ecd
3 changed files with 65 additions and 71 deletions

View file

@ -24,35 +24,37 @@ class RestoreOptionsPage extends BasePage {
left: 20.0, left: 20.0,
right: 20.0, right: 20.0,
), ),
child: Column( child: SingleChildScrollView(
children: <Widget>[ child: Column(
Flexible( children: <Widget>[
child: RestoreButton( Container(
onPressed: () {
Navigator.pushNamed(
context, Routes.restoreWalletOptionsFromWelcome);
},
image: _imageSeedKeys,
aspectRatioImage: _aspectRatioImage,
titleColor: Palette.lightViolet,
color: Palette.lightViolet,
title: S.of(context).restore_title_from_seed_keys,
description: S.of(context).restore_description_from_seed_keys,
textButton: S.of(context).restore_next,
),
),
Flexible(
child: RestoreButton( child: RestoreButton(
onPressed: () {}, onPressed: () {
image: _imageRestoreSeed, Navigator.pushNamed(
aspectRatioImage: _aspectRatioImage, context, Routes.restoreWalletOptionsFromWelcome);
titleColor: Palette.cakeGreen, },
color: Palette.cakeGreen, image: _imageSeedKeys,
title: S.of(context).restore_title_from_backup, aspectRatioImage: _aspectRatioImage,
description: S.of(context).restore_description_from_backup, titleColor: Palette.lightViolet,
textButton: S.of(context).restore_next, color: Palette.lightViolet,
)) title: S.of(context).restore_title_from_seed_keys,
], description: S.of(context).restore_description_from_seed_keys,
textButton: S.of(context).restore_next,
),
),
Container(
child: RestoreButton(
onPressed: () {},
image: _imageRestoreSeed,
aspectRatioImage: _aspectRatioImage,
titleColor: Palette.cakeGreen,
color: Palette.cakeGreen,
title: S.of(context).restore_title_from_backup,
description: S.of(context).restore_description_from_backup,
textButton: S.of(context).restore_next,
))
],
),
), ),
); );
} }

View file

@ -29,37 +29,39 @@ class RestoreWalletOptionsPage extends BasePage {
left: 20.0, left: 20.0,
right: 20.0, right: 20.0,
), ),
child: Column( child: SingleChildScrollView(
children: <Widget>[ child: Column(
Flexible( children: <Widget>[
child: RestoreButton( Container(
onPressed: () { child: RestoreButton(
seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromSeed); onPressed: () {
Navigator.pushNamed(context, Routes.seedLanguage); seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromSeed);
}, Navigator.pushNamed(context, Routes.seedLanguage);
image: _imageSeed, },
aspectRatioImage: _aspectRatioImage, image: _imageSeed,
titleColor: Palette.lightViolet, aspectRatioImage: _aspectRatioImage,
color: Palette.lightViolet, titleColor: Palette.lightViolet,
title: S.of(context).restore_title_from_seed, color: Palette.lightViolet,
description: S.of(context).restore_description_from_seed, title: S.of(context).restore_title_from_seed,
textButton: S.of(context).restore_next, description: S.of(context).restore_description_from_seed,
)), textButton: S.of(context).restore_next,
Flexible( )),
child: RestoreButton( Container(
onPressed: () { child: RestoreButton(
seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromKeys); onPressed: () {
Navigator.pushNamed(context, Routes.seedLanguage); seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromKeys);
}, Navigator.pushNamed(context, Routes.seedLanguage);
image: _imageKeys, },
aspectRatioImage: _aspectRatioImage, image: _imageKeys,
titleColor: Palette.cakeGreen, aspectRatioImage: _aspectRatioImage,
color: Palette.cakeGreen, titleColor: Palette.cakeGreen,
title: S.of(context).restore_title_from_keys, color: Palette.cakeGreen,
description: S.of(context).restore_description_from_keys, title: S.of(context).restore_title_from_keys,
textButton: S.of(context).restore_next, description: S.of(context).restore_description_from_keys,
)) textButton: S.of(context).restore_next,
], ))
],
),
), ),
); );
} }

View file

@ -45,17 +45,7 @@ class RestoreButton extends StatelessWidget {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Flexible( image,
child: Container(
child: AspectRatio(
aspectRatio: aspectRatioImage,
child: FittedBox(
fit: BoxFit.contain,
child: image,
),
),
),
),
Column( Column(
children: <Widget>[ children: <Widget>[
Padding( Padding(
@ -66,7 +56,7 @@ class RestoreButton extends StatelessWidget {
style: TextStyle( style: TextStyle(
color: titleColor, color: titleColor,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
maxLines: 1, maxLines: 2,
), ),
), ),
Padding( Padding(