CWA-179 | added scroll to restore_option_page and to restore_wallet_options_page
Oleksandr Sobol committed
Mar 5, 2020 at 20:31 UTC
6e7ba33ecd0014bc5f090c2826a2a6015b84228b
3 files changed
+65
-71
lib/src/screens/restore/restore_options_page.dart
+30
-28
@@ -24,35 +24,37 @@ class RestoreOptionsPage extends BasePage {
24
left: 20.0,
25
right: 20.0,
26
),
27
- child: Column(
28
- children: <Widget>[
29
- Flexible(
30
- child: RestoreButton(
31
- onPressed: () {
32
- Navigator.pushNamed(
33
- context, Routes.restoreWalletOptionsFromWelcome);
34
- },
35
- image: _imageSeedKeys,
36
- aspectRatioImage: _aspectRatioImage,
37
- titleColor: Palette.lightViolet,
38
- color: Palette.lightViolet,
39
- title: S.of(context).restore_title_from_seed_keys,
40
- description: S.of(context).restore_description_from_seed_keys,
41
- textButton: S.of(context).restore_next,
42
- ),
43
- ),
44
- Flexible(
27
+ child: SingleChildScrollView(
28
+ child: Column(
29
+ children: <Widget>[
30
+ Container(
31
child: RestoreButton(
46
- onPressed: () {},
47
- image: _imageRestoreSeed,
48
- aspectRatioImage: _aspectRatioImage,
49
- titleColor: Palette.cakeGreen,
50
- color: Palette.cakeGreen,
51
- title: S.of(context).restore_title_from_backup,
52
- description: S.of(context).restore_description_from_backup,
53
- textButton: S.of(context).restore_next,
54
- ))
55
- ],
32
+ onPressed: () {
33
+ Navigator.pushNamed(
34
+ context, Routes.restoreWalletOptionsFromWelcome);
35
+ },
36
+ image: _imageSeedKeys,
37
+ aspectRatioImage: _aspectRatioImage,
38
+ titleColor: Palette.lightViolet,
39
+ color: Palette.lightViolet,
40
+ title: S.of(context).restore_title_from_seed_keys,
41
+ description: S.of(context).restore_description_from_seed_keys,
42
+ textButton: S.of(context).restore_next,
43
+ ),
44
+ ),
45
+ Container(
46
+ child: RestoreButton(
47
+ onPressed: () {},
48
+ image: _imageRestoreSeed,
49
+ aspectRatioImage: _aspectRatioImage,
50
+ titleColor: Palette.cakeGreen,
51
+ color: Palette.cakeGreen,
52
+ title: S.of(context).restore_title_from_backup,
53
+ description: S.of(context).restore_description_from_backup,
54
+ textButton: S.of(context).restore_next,
55
+ ))
56
+ ],
57
+ ),
58
),
59
);
60
}
lib/src/screens/restore/restore_wallet_options_page.dart
+33
-31
@@ -29,37 +29,39 @@ class RestoreWalletOptionsPage extends BasePage {
29
left: 20.0,
30
right: 20.0,
31
),
32
- child: Column(
33
- children: <Widget>[
34
- Flexible(
35
- child: RestoreButton(
36
- onPressed: () {
37
- seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromSeed);
38
- Navigator.pushNamed(context, Routes.seedLanguage);
39
- },
40
- image: _imageSeed,
41
- aspectRatioImage: _aspectRatioImage,
42
- titleColor: Palette.lightViolet,
43
- color: Palette.lightViolet,
44
- title: S.of(context).restore_title_from_seed,
45
- description: S.of(context).restore_description_from_seed,
46
- textButton: S.of(context).restore_next,
47
- )),
48
- Flexible(
49
- child: RestoreButton(
50
- onPressed: () {
51
- seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromKeys);
52
- Navigator.pushNamed(context, Routes.seedLanguage);
53
- },
54
- image: _imageKeys,
55
- aspectRatioImage: _aspectRatioImage,
56
- titleColor: Palette.cakeGreen,
57
- color: Palette.cakeGreen,
58
- title: S.of(context).restore_title_from_keys,
59
- description: S.of(context).restore_description_from_keys,
60
- textButton: S.of(context).restore_next,
61
- ))
62
- ],
32
+ child: SingleChildScrollView(
33
+ child: Column(
34
+ children: <Widget>[
35
+ Container(
36
+ child: RestoreButton(
37
+ onPressed: () {
38
+ seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromSeed);
39
+ Navigator.pushNamed(context, Routes.seedLanguage);
40
+ },
41
+ image: _imageSeed,
42
+ aspectRatioImage: _aspectRatioImage,
43
+ titleColor: Palette.lightViolet,
44
+ color: Palette.lightViolet,
45
+ title: S.of(context).restore_title_from_seed,
46
+ description: S.of(context).restore_description_from_seed,
47
+ textButton: S.of(context).restore_next,
48
+ )),
49
+ Container(
50
+ child: RestoreButton(
51
+ onPressed: () {
52
+ seedLanguageStore.setCurrentRoute(Routes.restoreWalletFromKeys);
53
+ Navigator.pushNamed(context, Routes.seedLanguage);
54
+ },
55
+ image: _imageKeys,
56
+ aspectRatioImage: _aspectRatioImage,
57
+ titleColor: Palette.cakeGreen,
58
+ color: Palette.cakeGreen,
59
+ title: S.of(context).restore_title_from_keys,
60
+ description: S.of(context).restore_description_from_keys,
61
+ textButton: S.of(context).restore_next,
62
+ ))
63
+ ],
64
+ ),
65
),
66
);
67
}
lib/src/screens/restore/widgets/restore_button.dart
+2
-12
@@ -45,17 +45,7 @@ class RestoreButton extends StatelessWidget {
45
child: Column(
46
mainAxisAlignment: MainAxisAlignment.spaceBetween,
47
children: <Widget>[
48
- Flexible(
49
- child: Container(
50
- child: AspectRatio(
51
- aspectRatio: aspectRatioImage,
52
- child: FittedBox(
53
- fit: BoxFit.contain,
54
- child: image,
55
- ),
56
- ),
57
- ),
58
- ),
48
+ image,
49
Column(
50
children: <Widget>[
51
Padding(
@@ -66,7 +56,7 @@ class RestoreButton extends StatelessWidget {
56
style: TextStyle(
57
color: titleColor,
58
fontWeight: FontWeight.bold),
69
- maxLines: 1,
59
+ maxLines: 2,
60
),
61
),
62
Padding(