@@ -48,21 +48,30 @@ class EmailCodeVerificationPage extends StatelessWidget {
48
48
child: SingleChildScrollView (
49
49
child: Column (
50
50
mainAxisAlignment: MainAxisAlignment .center,
51
+ crossAxisAlignment: CrossAxisAlignment .stretch, // Stretch buttons
51
52
children: [
52
- const Icon (Icons .mark_email_read_outlined, size: 80 ),
53
+ Icon (
54
+ Icons .mark_email_read_outlined,
55
+ size: AppSpacing .xxl * 2 , // Standardized large icon
56
+ color: colorScheme.primary,
57
+ ),
53
58
const SizedBox (height: AppSpacing .xl),
54
59
Text (
55
60
l10n.emailCodeSentConfirmation (email),
56
- style: textTheme.titleLarge,
61
+ style: textTheme.headlineSmall? .copyWith (
62
+ fontWeight: FontWeight .bold, // Ensure prominence
63
+ ),
57
64
textAlign: TextAlign .center,
58
65
),
59
- const SizedBox (height: AppSpacing .xxl),
66
+ const SizedBox (height: AppSpacing .lg), // Adjusted spacing
60
67
Text (
61
68
l10n.emailCodeSentInstructions,
62
- style: textTheme.bodyMedium,
69
+ style: textTheme.bodyLarge? .copyWith (
70
+ color: colorScheme
71
+ .onSurfaceVariant), // Softer color
63
72
textAlign: TextAlign .center,
64
73
),
65
- const SizedBox (height: AppSpacing .lg),
74
+ const SizedBox (height: AppSpacing .xl), // Increased spacing
66
75
_EmailCodeVerificationForm (
67
76
email: email,
68
77
isLoading: isLoading,
@@ -118,25 +127,29 @@ class _EmailCodeVerificationFormState
118
127
@override
119
128
Widget build (BuildContext context) {
120
129
final l10n = context.l10n;
130
+ final textTheme = Theme .of (context).textTheme; // Added missing textTheme
121
131
122
132
return Form (
123
133
key: _formKey,
124
134
child: Column (
125
135
mainAxisSize: MainAxisSize .min,
126
136
children: [
127
137
Padding (
128
- padding: const EdgeInsets .symmetric (horizontal: AppSpacing .md),
138
+ // No horizontal padding needed if column is stretched
139
+ // padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md),
140
+ padding: EdgeInsets .zero,
129
141
child: TextFormField (
130
142
controller: _codeController,
131
143
decoration: InputDecoration (
132
- hintText : l10n.emailCodeVerificationHint,
133
- border: const OutlineInputBorder (),
144
+ labelText : l10n.emailCodeVerificationHint, // Use labelText
145
+ // border: const OutlineInputBorder(), // Uses theme default
134
146
counterText: '' , // Hide the counter
135
147
),
136
148
keyboardType: TextInputType .number,
137
149
inputFormatters: [FilteringTextInputFormatter .digitsOnly],
138
150
maxLength: 6 ,
139
151
textAlign: TextAlign .center,
152
+ style: textTheme.headlineSmall, // Make input text larger
140
153
enabled: ! widget.isLoading,
141
154
validator: (value) {
142
155
if (value == null || value.isEmpty) {
@@ -150,17 +163,23 @@ class _EmailCodeVerificationFormState
150
163
onFieldSubmitted: widget.isLoading ? null : (_) => _submitForm (),
151
164
),
152
165
),
153
- const SizedBox (height: AppSpacing .xl),
166
+ const SizedBox (height: AppSpacing .xxl), // Increased spacing
154
167
ElevatedButton (
168
+ style: ElevatedButton .styleFrom (
169
+ padding: const EdgeInsets .symmetric (vertical: AppSpacing .md),
170
+ textStyle: textTheme.labelLarge,
171
+ ),
155
172
onPressed: widget.isLoading ? null : _submitForm,
156
- child:
157
- widget.isLoading
158
- ? const SizedBox (
159
- height: 24 ,
160
- width: 24 ,
161
- child: CircularProgressIndicator (strokeWidth: 2 ),
162
- )
163
- : Text (l10n.emailCodeVerificationButtonLabel),
173
+ child: widget.isLoading
174
+ ? const SizedBox (
175
+ height: AppSpacing .xl, // Consistent size with text
176
+ width: AppSpacing .xl,
177
+ child: CircularProgressIndicator (
178
+ strokeWidth: 2 ,
179
+ color: Colors .white, // Explicit color for loader on button
180
+ ),
181
+ )
182
+ : Text (l10n.emailCodeVerificationButtonLabel),
164
183
),
165
184
],
166
185
),
0 commit comments