CWA-221 | reworked new_wallet_page, new_wallet_type_page, seed_page and welcome_page as adaptive pages; added light theme pictures
Oleksandr Sobol committed
Jun 9, 2020 at 21:43 UTC
a5551f0de3e853ed9cb818f461b19b0eb56fa0ff
14 files changed
+358
-231
assets/images/2.0x/wallet_name_light.png
Binary files /dev/null and b/assets/images/2.0x/wallet_name_light.png differ
assets/images/2.0x/wallet_type_light.png
Binary files /dev/null and b/assets/images/2.0x/wallet_type_light.png differ
assets/images/2.0x/welcome_light.png
Binary files /dev/null and b/assets/images/2.0x/welcome_light.png differ
assets/images/3.0x/wallet_name_light.png
Binary files /dev/null and b/assets/images/3.0x/wallet_name_light.png differ
assets/images/3.0x/wallet_type_light.png
Binary files /dev/null and b/assets/images/3.0x/wallet_type_light.png differ
assets/images/3.0x/welcome_light.png
Binary files /dev/null and b/assets/images/3.0x/welcome_light.png differ
assets/images/wallet_name_light.png
Binary files /dev/null and b/assets/images/wallet_name_light.png differ
assets/images/wallet_type_light.png
Binary files /dev/null and b/assets/images/wallet_type_light.png differ
assets/images/welcome_light.png
Binary files /dev/null and b/assets/images/welcome_light.png differ
lib/src/screens/new_wallet/new_wallet_page.dart
+96
-5
@@ -11,11 +11,13 @@ import 'package:cake_wallet/src/domain/services/wallet_list_service.dart';
11
import 'package:cake_wallet/src/domain/services/wallet_service.dart';
12
import 'package:cake_wallet/src/screens/base_page.dart';
13
import 'package:cake_wallet/src/widgets/primary_button.dart';
14
-import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
14
import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
15
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
16
import 'package:cake_wallet/src/screens/seed_language/widgets/seed_language_picker.dart';
17
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
18
+import 'package:cake_wallet/src/widgets/base_text_form_field.dart';
19
+import 'package:cake_wallet/themes.dart';
20
+import 'package:cake_wallet/theme_changer.dart';
21
22
class NewWalletPage extends BasePage {
23
NewWalletPage(
@@ -30,6 +32,9 @@ class NewWalletPage extends BasePage {
32
@override
33
String get title => S.current.new_wallet;
34
35
+ @override
36
+ bool get resizeToAvoidBottomPadding => false;
37
+
38
@override
39
Widget body(BuildContext context) => WalletNameForm();
40
}
@@ -44,7 +49,8 @@ class _WalletNameFormState extends State<WalletNameForm> {
49
50
final _formKey = GlobalKey<FormState>();
51
final nameController = TextEditingController();
47
- final walletNameImage = Image.asset('assets/images/wallet_name.png');
52
+ final walletNameImageLight = Image.asset('assets/images/wallet_name_light.png');
53
+ final walletNameImageDark = Image.asset('assets/images/wallet_name.png');
54
55
@override
56
void dispose() {
@@ -56,6 +62,9 @@ class _WalletNameFormState extends State<WalletNameForm> {
62
Widget build(BuildContext context) {
63
final walletCreationStore = Provider.of<WalletCreationStore>(context);
64
final seedLanguageStore = Provider.of<SeedLanguageStore>(context);
65
+ final _themeChanger = Provider.of<ThemeChanger>(context);
66
+ final walletNameImage = _themeChanger.getTheme() == Themes.darkTheme
67
+ ? walletNameImageDark : walletNameImageLight;
68
69
final List<String> seedLocales = [
70
S.current.seed_language_english,
@@ -98,8 +107,90 @@ class _WalletNameFormState extends State<WalletNameForm> {
107
});
108
109
return Container(
101
- padding: EdgeInsets.only(top: 24),
102
- child: ScrollableWithBottomSection(
110
+ padding: EdgeInsets.all(24),
111
+ child: Column(
112
+ children: <Widget>[
113
+ Flexible(
114
+ flex: 2,
115
+ child: AspectRatio(
116
+ aspectRatio: aspectRatioImage,
117
+ child: FittedBox(child: walletNameImage, fit: BoxFit.fill)
118
+ )
119
+ ),
120
+ Flexible(
121
+ flex: 3,
122
+ child: Column(
123
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
124
+ children: <Widget>[
125
+ Column(
126
+ children: <Widget>[
127
+ Padding(
128
+ padding: EdgeInsets.only(top: 24),
129
+ child: Form(
130
+ key: _formKey,
131
+ child: BaseTextFormField(
132
+ controller: nameController,
133
+ textAlign: TextAlign.center,
134
+ textFontSize: 20.0,
135
+ hintText: S.of(context).wallet_name,
136
+ validator: (value) {
137
+ walletCreationStore.validateWalletName(value);
138
+ return walletCreationStore.errorMessage;
139
+ }
140
+ )
141
+ ),
142
+ ),
143
+ Padding(padding: EdgeInsets.only(top: 24),
144
+ child: Text(
145
+ S.of(context).seed_language_choose,
146
+ textAlign: TextAlign.center,
147
+ style: TextStyle(
148
+ fontSize: 16.0,
149
+ fontWeight: FontWeight.w600,
150
+ color: Theme.of(context).primaryTextTheme.title.color
151
+ ),
152
+ ),
153
+ ),
154
+ Padding(padding: EdgeInsets.only(top: 24),
155
+ child: Observer(
156
+ builder: (_) => SelectButton(
157
+ image: null,
158
+ text: seedLocales[seedLanguages.indexOf(seedLanguageStore.selectedSeedLanguage)],
159
+ color: Theme.of(context).accentTextTheme.title.backgroundColor,
160
+ textColor: Theme.of(context).primaryTextTheme.title.color,
161
+ onTap: () async => await showDialog(
162
+ context: context,
163
+ builder: (BuildContext context) => SeedLanguagePicker()
164
+ )
165
+ )
166
+ ),
167
+ )
168
+ ],
169
+ ),
170
+ Observer(
171
+ builder: (context) {
172
+ return LoadingPrimaryButton(
173
+ onPressed: () {
174
+ if (_formKey.currentState.validate()) {
175
+ walletCreationStore.create(name: nameController.text,
176
+ language: seedLanguageStore.selectedSeedLanguage);
177
+ }
178
+ },
179
+ text: S.of(context).continue_text,
180
+ color: Colors.green,
181
+ textColor: Colors.white,
182
+ isLoading: walletCreationStore.state is WalletIsCreating,
183
+ isDisabled: walletCreationStore.isDisabledStatus,
184
+ );
185
+ },
186
+ )
187
+ ],
188
+ )
189
+ )
190
+ ],
191
+ )
192
+
193
+ /*ScrollableWithBottomSection(
194
contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
195
content: Column(
196
crossAxisAlignment: CrossAxisAlignment.center,
@@ -184,7 +275,7 @@ class _WalletNameFormState extends State<WalletNameForm> {
275
isDisabled: walletCreationStore.isDisabledStatus,
276
);
277
},
187
- )),
278
+ )),*/
279
);
280
}
281
}
lib/src/screens/new_wallet/new_wallet_type_page.dart
+68
-57
@@ -3,9 +3,11 @@ import 'package:flutter/cupertino.dart';
3
import 'package:cake_wallet/generated/i18n.dart';
4
import 'package:cake_wallet/src/screens/base_page.dart';
5
import 'package:cake_wallet/src/widgets/primary_button.dart';
6
-import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
6
import 'package:cake_wallet/src/screens/new_wallet/widgets/select_button.dart';
7
import 'package:cake_wallet/routes.dart';
8
+import 'package:provider/provider.dart';
9
+import 'package:cake_wallet/themes.dart';
10
+import 'package:cake_wallet/theme_changer.dart';
11
12
class NewWalletTypePage extends BasePage {
13
@override
@@ -25,7 +27,8 @@ class WalletTypeFormState extends State<WalletTypeForm> {
27
28
final moneroIcon = Image.asset('assets/images/monero.png', height: 24, width: 24);
29
final bitcoinIcon = Image.asset('assets/images/bitcoin.png', height: 24, width: 24);
28
- final walletTypeImage = Image.asset('assets/images/wallet_type.png');
30
+ final walletTypeImageLight = Image.asset('assets/images/wallet_type_light.png');
31
+ final walletTypeImageDark = Image.asset('assets/images/wallet_type.png');
32
33
bool isDisabledButton;
34
bool isMoneroSelected;
@@ -56,64 +59,72 @@ class WalletTypeFormState extends State<WalletTypeForm> {
59
60
@override
61
Widget build(BuildContext context) {
62
+ final _themeChanger = Provider.of<ThemeChanger>(context);
63
+ final walletTypeImage = _themeChanger.getTheme() == Themes.darkTheme
64
+ ? walletTypeImageDark : walletTypeImageLight;
65
+
66
return Container(
60
- padding: EdgeInsets.only(top: 24),
61
- child: ScrollableWithBottomSection(
62
- contentPadding: EdgeInsets.only(left: 24, right: 24, bottom: 24),
63
- content: Column(
64
- crossAxisAlignment: CrossAxisAlignment.center,
65
- children: <Widget>[
66
- Padding(
67
- padding: EdgeInsets.only(left: 12, right: 12),
68
- child: AspectRatio(
69
- aspectRatio: aspectRatioImage,
70
- child: FittedBox(child: walletTypeImage, fit: BoxFit.fill)),
71
- ),
72
- Padding(
73
- padding: EdgeInsets.only(top: 48),
74
- child: Text(
75
- S.of(context).choose_wallet_currency,
76
- textAlign: TextAlign.center,
77
- style: TextStyle(
78
- fontSize: 16,
79
- fontWeight: FontWeight.w600,
80
- color: Theme.of(context).primaryTextTheme.title.color
67
+ padding: EdgeInsets.all(24),
68
+ child: Column(
69
+ children: <Widget>[
70
+ Flexible(
71
+ flex: 2,
72
+ child: AspectRatio(
73
+ aspectRatio: aspectRatioImage,
74
+ child: FittedBox(child: walletTypeImage, fit: BoxFit.fill)
75
+ )
76
+ ),
77
+ Flexible(
78
+ flex: 3,
79
+ child: Column(
80
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
81
+ children: <Widget>[
82
+ Column(
83
+ children: <Widget>[
84
+ Padding(
85
+ padding: EdgeInsets.only(top: 24),
86
+ child: Text(
87
+ S.of(context).choose_wallet_currency,
88
+ textAlign: TextAlign.center,
89
+ style: TextStyle(
90
+ fontSize: 16,
91
+ fontWeight: FontWeight.w600,
92
+ color: Theme.of(context).primaryTextTheme.title.color
93
+ ),
94
+ ),
95
+ ),
96
+ Padding(
97
+ padding: EdgeInsets.only(top: 24),
98
+ child: SelectButton(
99
+ image: bitcoinIcon,
100
+ text: 'Bitcoin',
101
+ color: bitcoinBackgroundColor,
102
+ textColor: bitcoinTextColor,
103
+ onTap: () {}),
104
+ ),
105
+ Padding(
106
+ padding: EdgeInsets.only(top: 20),
107
+ child: SelectButton(
108
+ image: moneroIcon,
109
+ text: 'Monero',
110
+ color: moneroBackgroundColor,
111
+ textColor: moneroTextColor,
112
+ onTap: () => onSelectMoneroButton(context)),
113
+ )
114
+ ],
115
),
82
- ),
83
- ),
84
- Padding(
85
- padding: EdgeInsets.only(top: 24),
86
- child: SelectButton(
87
- image: bitcoinIcon,
88
- text: 'Bitcoin',
89
- color: bitcoinBackgroundColor,
90
- textColor: bitcoinTextColor,
91
- onTap: () {}),
92
- ),
93
- Padding(
94
- padding: EdgeInsets.only(top: 20),
95
- child: SelectButton(
96
- image: moneroIcon,
97
- text: 'Monero',
98
- color: moneroBackgroundColor,
99
- textColor: moneroTextColor,
100
- onTap: () => onSelectMoneroButton(context)),
116
+ PrimaryButton(
117
+ onPressed: () => Navigator.of(context).pushNamed(Routes.newWallet),
118
+ text: S.of(context).seed_language_next,
119
+ color: Colors.green,
120
+ textColor: Colors.white,
121
+ isDisabled: isDisabledButton,
122
+ )
123
+ ],
124
)
102
- ],
103
- ),
104
- bottomSectionPadding: EdgeInsets.only(
105
- left: 24,
106
- right: 24,
107
- bottom: 24
108
- ),
109
- bottomSection: PrimaryButton(
110
- onPressed: () => Navigator.of(context).pushNamed(Routes.newWallet),
111
- text: S.of(context).seed_language_next,
112
- color: Colors.green,
113
- textColor: Colors.white,
114
- isDisabled: isDisabledButton,
115
- ),
116
- ),
125
+ )
126
+ ],
127
+ )
128
);
129
}
130
lib/src/screens/seed/seed_page.dart
+99
-93
@@ -8,12 +8,14 @@ import 'package:cake_wallet/generated/i18n.dart';
8
import 'package:cake_wallet/src/widgets/primary_button.dart';
9
import 'package:cake_wallet/src/stores/wallet_seed/wallet_seed_store.dart';
10
import 'package:cake_wallet/src/screens/base_page.dart';
11
-import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
11
+import 'package:cake_wallet/themes.dart';
12
+import 'package:cake_wallet/theme_changer.dart';
13
14
class SeedPage extends BasePage {
15
SeedPage({this.onCloseCallback});
16
16
- static final image = Image.asset('assets/images/crypto_lock.png');
17
+ static final imageLight = Image.asset('assets/images/crypto_lock_light.png');
18
+ static final imageDark = Image.asset('assets/images/crypto_lock.png');
19
20
@override
21
String get title => S.current.seed_title;
@@ -58,104 +60,108 @@ class SeedPage extends BasePage {
60
@override
61
Widget body(BuildContext context) {
62
final walletSeedStore = Provider.of<WalletSeedStore>(context);
63
+ final _themeChanger = Provider.of<ThemeChanger>(context);
64
+ final image = _themeChanger.getTheme() == Themes.darkTheme
65
+ ? imageDark : imageLight;
66
+
67
String _seed;
68
69
return Container(
64
- width: double.infinity,
65
- height: double.infinity,
66
- child: ScrollableWithBottomSection(
67
- contentPadding: EdgeInsets.only(left: 40, right: 40, bottom: 20),
68
- content: Column(
69
- children: <Widget>[
70
- Padding(
71
- padding: EdgeInsets.only(top: 33),
72
- child: image,
73
- ),
74
- Padding(
75
- padding: EdgeInsets.only(top: 33),
76
- child: Observer(
77
- builder: (_) {
78
- _seed = walletSeedStore.seed;
79
-
80
- return Column(
81
- crossAxisAlignment: CrossAxisAlignment.center,
82
- children: <Widget>[
83
- Text(
84
- walletSeedStore.name,
85
- style: TextStyle(
86
- fontSize: 20,
87
- fontWeight: FontWeight.bold,
88
- color: Theme.of(context).primaryTextTheme.title.color
89
- ),
90
- ),
91
- Padding(
92
- padding: EdgeInsets.only(top: 20),
93
- child: Text(
94
- _seed,
95
- textAlign: TextAlign.center,
96
- style: TextStyle(
97
- fontSize: 14,
98
- color: Theme.of(context).primaryTextTheme.caption.color
99
- ),
100
- ),
101
- )
102
- ],
103
- );
104
- }
105
- ),
70
+ padding: EdgeInsets.all(24),
71
+ child: Column(
72
+ children: <Widget>[
73
+ Flexible(
74
+ flex: 2,
75
+ child: AspectRatio(
76
+ aspectRatio: 1,
77
+ child: FittedBox(child: image, fit: BoxFit.fill)
78
)
107
- ],
108
- ),
109
- bottomSectionPadding: EdgeInsets.only(
110
- left: 24,
111
- right: 24,
112
- bottom: 52
113
- ),
114
- bottomSection: Container(
115
- child: Row(
116
- mainAxisSize: MainAxisSize.max,
117
- children: <Widget>[
118
- Flexible(
119
- child: Container(
120
- padding: EdgeInsets.only(right: 8.0),
121
- child: PrimaryButton(
122
- onPressed: () => Share.text(
123
- S.of(context).seed_share,
124
- _seed,
125
- 'text/plain'),
126
- text: S.of(context).save,
127
- color: Colors.green,
128
- textColor: Colors.white),
129
- )
130
- ),
131
- Flexible(
132
- child: Container(
133
- padding: EdgeInsets.only(left: 8.0),
134
- child: Builder(
135
- builder: (context) => PrimaryButton(
136
- onPressed: () {
137
- Clipboard.setData(
138
- ClipboardData(text: _seed));
139
- Scaffold.of(context).showSnackBar(
140
- SnackBar(
141
- content: Text(S
142
- .of(context)
143
- .copied_to_clipboard),
144
- backgroundColor: Colors.green,
145
- duration: Duration(milliseconds: 1500),
79
+ ),
80
+ Flexible(
81
+ flex: 3,
82
+ child: Column(
83
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
84
+ children: <Widget>[
85
+ Padding(
86
+ padding: EdgeInsets.only(top: 33),
87
+ child: Observer(
88
+ builder: (_) {
89
+ _seed = walletSeedStore.seed;
90
+
91
+ return Column(
92
+ crossAxisAlignment: CrossAxisAlignment.center,
93
+ children: <Widget>[
94
+ Text(
95
+ walletSeedStore.name,
96
+ style: TextStyle(
97
+ fontSize: 20,
98
+ fontWeight: FontWeight.bold,
99
+ color: Theme.of(context).primaryTextTheme.title.color
100
+ ),
101
),
147
- );
148
- },
149
- text: S.of(context).copy,
150
- color: Colors.blue,
151
- textColor: Colors.white)
102
+ Padding(
103
+ padding: EdgeInsets.only(top: 20),
104
+ child: Text(
105
+ _seed,
106
+ textAlign: TextAlign.center,
107
+ style: TextStyle(
108
+ fontSize: 14,
109
+ color: Theme.of(context).primaryTextTheme.caption.color
110
+ ),
111
+ ),
112
+ )
113
+ ],
114
+ );
115
+ }
116
),
117
+ ),
118
+ Row(
119
+ mainAxisSize: MainAxisSize.max,
120
+ children: <Widget>[
121
+ Flexible(
122
+ child: Container(
123
+ padding: EdgeInsets.only(right: 8.0),
124
+ child: PrimaryButton(
125
+ onPressed: () => Share.text(
126
+ S.of(context).seed_share,
127
+ _seed,
128
+ 'text/plain'),
129
+ text: S.of(context).save,
130
+ color: Colors.green,
131
+ textColor: Colors.white),
132
+ )
133
+ ),
134
+ Flexible(
135
+ child: Container(
136
+ padding: EdgeInsets.only(left: 8.0),
137
+ child: Builder(
138
+ builder: (context) => PrimaryButton(
139
+ onPressed: () {
140
+ Clipboard.setData(
141
+ ClipboardData(text: _seed));
142
+ Scaffold.of(context).showSnackBar(
143
+ SnackBar(
144
+ content: Text(S
145
+ .of(context)
146
+ .copied_to_clipboard),
147
+ backgroundColor: Colors.green,
148
+ duration: Duration(milliseconds: 1500),
149
+ ),
150
+ );
151
+ },
152
+ text: S.of(context).copy,
153
+ color: Colors.blue,
154
+ textColor: Colors.white)
155
+ ),
156
+ )
157
+ )
158
+ ],
159
)
154
- )
155
- ],
156
- ),
157
- ),
158
- ),
160
+ ],
161
+ )
162
+ )
163
+ ],
164
+ )
165
);
166
}
167
}
lib/src/screens/welcome/welcome_page.dart
+89
-74
@@ -4,11 +4,14 @@ import 'package:cake_wallet/routes.dart';
4
import 'package:cake_wallet/src/widgets/primary_button.dart';
5
import 'package:cake_wallet/src/screens/base_page.dart';
6
import 'package:cake_wallet/generated/i18n.dart';
7
-import 'package:cake_wallet/src/widgets/scollable_with_bottom_section.dart';
7
+import 'package:provider/provider.dart';
8
+import 'package:cake_wallet/themes.dart';
9
+import 'package:cake_wallet/theme_changer.dart';
10
11
class WelcomePage extends BasePage {
12
static const aspectRatioImage = 1.25;
11
- final welcomeImage = Image.asset('assets/images/welcome.png');
13
+ final welcomeImageLight = Image.asset('assets/images/welcome_light.png');
14
+ final welcomeImageDark = Image.asset('assets/images/welcome.png');
15
16
@override
17
Widget build(BuildContext context) {
@@ -20,6 +23,10 @@ class WelcomePage extends BasePage {
23
24
@override
25
Widget body(BuildContext context) {
26
+ final _themeChanger = Provider.of<ThemeChanger>(context);
27
+ final welcomeImage = _themeChanger.getTheme() == Themes.darkTheme
28
+ ? welcomeImageDark : welcomeImageLight;
29
+
30
final newWalletImage = Image.asset('assets/images/new_wallet.png',
31
height: 12,
32
width: 12,
@@ -30,89 +37,97 @@ class WelcomePage extends BasePage {
37
color: Theme.of(context).primaryTextTheme.title.color);
38
39
return Container(
33
- padding: EdgeInsets.only(top: 20),
34
- child: ScrollableWithBottomSection(
35
- contentPadding: EdgeInsets.only(bottom: 20),
36
- content: Column(
37
- children: <Widget>[
38
- AspectRatio(
40
+ padding: EdgeInsets.all(24),
41
+ child: Column(
42
+ children: <Widget>[
43
+ Flexible(
44
+ flex: 2,
45
+ child: AspectRatio(
46
aspectRatio: aspectRatioImage,
40
- child: FittedBox(child: welcomeImage, fit: BoxFit.fill)),
41
- Padding(
42
- padding: EdgeInsets.only(left: 24, right: 24, top: 40),
43
- child: Column(
44
- mainAxisAlignment: MainAxisAlignment.start,
45
- crossAxisAlignment: CrossAxisAlignment.center,
46
- children: <Widget>[
47
- Text(
48
- S.of(context).welcome,
49
- style: TextStyle(
50
- fontSize: 18,
51
- color: Theme.of(context).primaryTextTheme.caption.color,
47
+ child: FittedBox(child: welcomeImage, fit: BoxFit.fill)
48
+ )
49
+ ),
50
+ Flexible(
51
+ flex: 3,
52
+ child: Column(
53
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
54
+ children: <Widget>[
55
+ Column(
56
+ children: <Widget>[
57
+ Padding(
58
+ padding: EdgeInsets.only(top: 24),
59
+ child: Text(
60
+ S.of(context).welcome,
61
+ style: TextStyle(
62
+ fontSize: 18,
63
+ color: Theme.of(context).primaryTextTheme.caption.color,
64
+ ),
65
+ textAlign: TextAlign.center,
66
+ ),
67
),
53
- textAlign: TextAlign.center,
54
- ),
55
- Padding(
56
- padding: EdgeInsets.only(top: 10),
57
- child: Text(
58
- S.of(context).cake_wallet,
59
- style: TextStyle(
60
- fontSize: 36,
61
- fontWeight: FontWeight.bold,
62
- color: Theme.of(context).primaryTextTheme.title.color,
68
+ Padding(
69
+ padding: EdgeInsets.only(top: 10),
70
+ child: Text(
71
+ S.of(context).cake_wallet,
72
+ style: TextStyle(
73
+ fontSize: 36,
74
+ fontWeight: FontWeight.bold,
75
+ color: Theme.of(context).primaryTextTheme.title.color,
76
+ ),
77
+ textAlign: TextAlign.center,
78
),
64
- textAlign: TextAlign.center,
79
),
66
- ),
67
- Padding(
68
- padding: EdgeInsets.only(top: 14),
69
- child: Text(
70
- S.of(context).first_wallet_text,
80
+ Padding(
81
+ padding: EdgeInsets.only(top: 14),
82
+ child: Text(
83
+ S.of(context).first_wallet_text,
84
+ style: TextStyle(
85
+ fontSize: 16,
86
+ fontWeight: FontWeight.w600,
87
+ color: Theme.of(context).primaryTextTheme.caption.color,
88
+ ),
89
+ textAlign: TextAlign.center,
90
+ ),
91
+ ),
92
+ ],
93
+ ),
94
+ Column(
95
+ children: <Widget>[
96
+ Text(
97
+ S.of(context).please_make_selection,
98
style: TextStyle(
72
- fontSize: 16,
73
- fontWeight: FontWeight.w600,
99
+ fontSize: 12,
100
color: Theme.of(context).primaryTextTheme.caption.color,
101
),
102
textAlign: TextAlign.center,
103
),
78
- ),
79
- ],
80
- ),
104
+ Padding(
105
+ padding: EdgeInsets.only(top: 24),
106
+ child: PrimaryImageButton(
107
+ onPressed: () => Navigator.pushNamed(context, Routes.newWalletFromWelcome),
108
+ image: newWalletImage,
109
+ text: S.of(context).create_new,
110
+ color: Colors.white,
111
+ textColor: Palette.oceanBlue,
112
+ borderColor: Palette.oceanBlue,
113
+ ),
114
+ ),
115
+ Padding(
116
+ padding: EdgeInsets.only(top: 10),
117
+ child: PrimaryImageButton(
118
+ onPressed: () => Navigator.pushNamed(context, Routes.restoreOptions),
119
+ image: restoreWalletImage,
120
+ text: S.of(context).restore_wallet,
121
+ color: Theme.of(context).primaryTextTheme.overline.color,
122
+ textColor: Theme.of(context).primaryTextTheme.title.color),
123
+ )
124
+ ],
125
+ )
126
+ ],
127
)
82
- ],
83
- ),
84
- bottomSectionPadding: EdgeInsets.only(left: 24, right: 24, bottom: 20),
85
- bottomSection: Column(children: <Widget>[
86
- Text(
87
- S.of(context).please_make_selection,
88
- style: TextStyle(
89
- fontSize: 12,
90
- color: Theme.of(context).primaryTextTheme.caption.color,
91
- ),
92
- textAlign: TextAlign.center,
93
- ),
94
- Padding(
95
- padding: EdgeInsets.only(top: 24),
96
- child: PrimaryImageButton(
97
- onPressed: () => Navigator.pushNamed(context, Routes.newWalletFromWelcome),
98
- image: newWalletImage,
99
- text: S.of(context).create_new,
100
- color: Colors.white,
101
- textColor: Palette.oceanBlue,
102
- borderColor: Palette.oceanBlue,
103
- ),
104
- ),
105
- Padding(
106
- padding: EdgeInsets.only(top: 10),
107
- child: PrimaryImageButton(
108
- onPressed: () => Navigator.pushNamed(context, Routes.restoreOptions),
109
- image: restoreWalletImage,
110
- text: S.of(context).restore_wallet,
111
- color: Theme.of(context).primaryTextTheme.overline.color,
112
- textColor: Theme.of(context).primaryTextTheme.title.color),
128
)
114
- ]),
115
- ),
129
+ ],
130
+ )
131
);
132
}
133
}
lib/src/widgets/base_text_form_field.dart
+6
-2
@@ -14,6 +14,8 @@ class BaseTextFormField extends StatelessWidget {
14
this.textColor,
15
this.hintColor,
16
this.borderColor,
17
+ this.textFontSize = 16.0,
18
+ this.hintFontSize = 16.0,
19
this.prefix,
20
this.suffix,
21
this.suffixIcon,
@@ -32,6 +34,8 @@ class BaseTextFormField extends StatelessWidget {
34
final Color textColor;
35
final Color hintColor;
36
final Color borderColor;
37
+ final double textFontSize;
38
+ final double hintFontSize;
39
final Widget prefix;
40
final Widget suffix;
41
final Widget suffixIcon;
@@ -50,7 +54,7 @@ class BaseTextFormField extends StatelessWidget {
54
inputFormatters: inputFormatters,
55
enabled: enabled,
56
style: TextStyle(
53
- fontSize: 16.0,
57
+ fontSize: textFontSize,
58
color: textColor ?? Theme.of(context).primaryTextTheme.title.color
59
),
60
decoration: InputDecoration(
@@ -59,7 +63,7 @@ class BaseTextFormField extends StatelessWidget {
63
suffixIcon: suffixIcon,
64
hintStyle: TextStyle(
65
color: hintColor ?? Theme.of(context).primaryTextTheme.caption.color,
62
- fontSize: 16
66
+ fontSize: hintFontSize
67
),
68
hintText: hintText,
69
focusedBorder: UnderlineInputBorder(