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,
right: 20.0,
),
child: Column(
children: <Widget>[
Flexible(
child: RestoreButton(
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: SingleChildScrollView(
child: Column(
children: <Widget>[
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,
))
],
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,
),
),
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,
right: 20.0,
),
child: Column(
children: <Widget>[
Flexible(
child: RestoreButton(
onPressed: () {
seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromSeed);
Navigator.pushNamed(context, Routes.seedLanguage);
},
image: _imageSeed,
aspectRatioImage: _aspectRatioImage,
titleColor: Palette.lightViolet,
color: Palette.lightViolet,
title: S.of(context).restore_title_from_seed,
description: S.of(context).restore_description_from_seed,
textButton: S.of(context).restore_next,
)),
Flexible(
child: RestoreButton(
onPressed: () {
seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromKeys);
Navigator.pushNamed(context, Routes.seedLanguage);
},
image: _imageKeys,
aspectRatioImage: _aspectRatioImage,
titleColor: Palette.cakeGreen,
color: Palette.cakeGreen,
title: S.of(context).restore_title_from_keys,
description: S.of(context).restore_description_from_keys,
textButton: S.of(context).restore_next,
))
],
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
child: RestoreButton(
onPressed: () {
seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromSeed);
Navigator.pushNamed(context, Routes.seedLanguage);
},
image: _imageSeed,
aspectRatioImage: _aspectRatioImage,
titleColor: Palette.lightViolet,
color: Palette.lightViolet,
title: S.of(context).restore_title_from_seed,
description: S.of(context).restore_description_from_seed,
textButton: S.of(context).restore_next,
)),
Container(
child: RestoreButton(
onPressed: () {
seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromKeys);
Navigator.pushNamed(context, Routes.seedLanguage);
},
image: _imageKeys,
aspectRatioImage: _aspectRatioImage,
titleColor: Palette.cakeGreen,
color: Palette.cakeGreen,
title: S.of(context).restore_title_from_keys,
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(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Flexible(
child: Container(
child: AspectRatio(
aspectRatio: aspectRatioImage,
child: FittedBox(
fit: BoxFit.contain,
child: image,
),
),
),
),
image,
Column(
children: <Widget>[
Padding(
@ -66,7 +56,7 @@ class RestoreButton extends StatelessWidget {
style: TextStyle(
color: titleColor,
fontWeight: FontWeight.bold),
maxLines: 1,
maxLines: 2,
),
),
Padding(