Removed swipe back on preseed and seed screens for new wallet.
M committed
Dec 3, 2020 at 19:30 UTC
b309d0189256e31e1380002c7e51d90138bd183c
2 files changed
+44
-49
lib/src/screens/seed/pre_seed_page.dart
+42
-47
@@ -22,51 +22,46 @@ class PreSeedPage extends BasePage {
22
final image =
23
getIt.get<SettingsStore>().isDarkTheme ? imageDark : imageLight;
24
25
- return Container(
26
- padding: EdgeInsets.all(24),
27
- child: Column(
28
- children: [
29
- Flexible(
30
- flex: 2,
31
- child: AspectRatio(
32
- aspectRatio: 1,
33
- child: FittedBox(child: image, fit: BoxFit.contain))),
34
- Flexible(
35
- flex: 3,
36
- child: Column(
37
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
38
- children: [
39
- Padding(
40
- padding:
41
- EdgeInsets.only(top: 70, left: 16, right: 16),
42
- child: Text(
43
- S.of(context).pre_seed_description,
44
- textAlign: TextAlign.center,
45
- style: TextStyle(
46
- fontSize: 14,
47
- fontWeight: FontWeight.normal,
48
- color: Theme.of(context)
49
- .primaryTextTheme
50
- .caption
51
- .color),
52
- ),
53
- ),
54
- PrimaryButton(
55
- onPressed: () =>
56
- Navigator.of(context).popAndPushNamed(Routes.seed,
57
- arguments: true),
58
- text: S.of(context).pre_seed_button_text,
59
- color: Theme.of(context)
60
- .accentTextTheme
61
- .body2
62
- .color,
63
- textColor: Colors.white)
64
- ],
65
- )
66
- )
67
- ],
68
- ),
69
- );
25
+ return WillPopScope(
26
+ onWillPop: () async => false,
27
+ child: Container(
28
+ padding: EdgeInsets.all(24),
29
+ child: Column(
30
+ children: [
31
+ Flexible(
32
+ flex: 2,
33
+ child: AspectRatio(
34
+ aspectRatio: 1,
35
+ child: FittedBox(child: image, fit: BoxFit.contain))),
36
+ Flexible(
37
+ flex: 3,
38
+ child: Column(
39
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
40
+ children: [
41
+ Padding(
42
+ padding: EdgeInsets.only(top: 70, left: 16, right: 16),
43
+ child: Text(
44
+ S.of(context).pre_seed_description,
45
+ textAlign: TextAlign.center,
46
+ style: TextStyle(
47
+ fontSize: 14,
48
+ fontWeight: FontWeight.normal,
49
+ color: Theme.of(context)
50
+ .primaryTextTheme
51
+ .caption
52
+ .color),
53
+ ),
54
+ ),
55
+ PrimaryButton(
56
+ onPressed: () => Navigator.of(context)
57
+ .popAndPushNamed(Routes.seed, arguments: true),
58
+ text: S.of(context).pre_seed_button_text,
59
+ color: Theme.of(context).accentTextTheme.body2.color,
60
+ textColor: Colors.white)
61
+ ],
62
+ ))
63
+ ],
64
+ ),
65
+ ));
66
}
71
-
72
-}
\ No newline at end of file
67
+}
lib/src/screens/seed/wallet_seed_page.dart
+2
-2
@@ -86,7 +86,7 @@ class WalletSeedPage extends BasePage {
86
final image =
87
getIt.get<SettingsStore>().isDarkTheme ? imageDark : imageLight;
88
89
- return Container(
89
+ return WillPopScope(onWillPop: () async => false, child: Container(
90
padding: EdgeInsets.all(24),
91
child: Column(
92
children: <Widget>[
@@ -194,6 +194,6 @@ class WalletSeedPage extends BasePage {
194
],
195
))
196
],
197
- ));
197
+ )));
198
}
199
}