@@ -42,6 +42,7 @@ class _RequestCodeView extends StatelessWidget {
42
42
Widget build (BuildContext context) {
43
43
final l10n = context.l10n;
44
44
final colorScheme = Theme .of (context).colorScheme;
45
+ final textTheme = Theme .of (context).textTheme; // Added textTheme
45
46
46
47
return Scaffold (
47
48
appBar: AppBar (
@@ -106,27 +107,29 @@ class _RequestCodeView extends StatelessWidget {
106
107
mainAxisAlignment: MainAxisAlignment .center,
107
108
crossAxisAlignment: CrossAxisAlignment .stretch,
108
109
children: [
109
- // --- Hardcoded Icon ---
110
+ // --- Icon ---
110
111
Padding (
111
- padding: const EdgeInsets .only (
112
- bottom: AppSpacing .xl,
113
- ), // Spacing below icon
112
+ padding: const EdgeInsets .only (bottom: AppSpacing .xl),
114
113
child: Icon (
115
- Icons .email_outlined, // Hardcoded icon
116
- size:
117
- (Theme .of (context).iconTheme.size ??
118
- AppSpacing .xl) *
119
- 3.0 ,
120
- color: Theme .of (context).colorScheme.primary,
114
+ Icons .email_outlined,
115
+ size: AppSpacing .xxl * 2 , // Standardized large icon
116
+ color: colorScheme.primary,
121
117
),
122
118
),
123
- const SizedBox (
124
- height: AppSpacing .lg,
125
- ), // Space between icon and text
119
+ // const SizedBox(height: AppSpacing.lg), // Removed
126
120
// --- Explanation Text ---
127
121
Text (
128
- l10n.emailSignInExplanation,
129
- style: Theme .of (context).textTheme.bodyLarge,
122
+ l10n.requestCodePageHeadline, // Using a more title-like l10n key
123
+ style: textTheme.headlineSmall? .copyWith (
124
+ fontWeight: FontWeight .bold,
125
+ ),
126
+ textAlign: TextAlign .center,
127
+ ),
128
+ const SizedBox (height: AppSpacing .md),
129
+ Text (
130
+ l10n.requestCodePageSubheadline, // Using a more descriptive subheadline
131
+ style: textTheme.bodyLarge
132
+ ? .copyWith (color: colorScheme.onSurfaceVariant),
130
133
textAlign: TextAlign .center,
131
134
),
132
135
const SizedBox (height: AppSpacing .xxl),
@@ -177,6 +180,8 @@ class _EmailLinkFormState extends State<_EmailLinkForm> {
177
180
@override
178
181
Widget build (BuildContext context) {
179
182
final l10n = context.l10n;
183
+ final textTheme = Theme .of (context).textTheme; // Added textTheme
184
+ final colorScheme = Theme .of (context).colorScheme; // Added colorScheme
180
185
181
186
return Form (
182
187
key: _formKey,
@@ -186,9 +191,9 @@ class _EmailLinkFormState extends State<_EmailLinkForm> {
186
191
TextFormField (
187
192
controller: _emailController,
188
193
decoration: InputDecoration (
189
- labelText: l10n.authenticationEmailLabel,
190
- border : const OutlineInputBorder (),
191
- // Consider adding hint text if needed
194
+ labelText: l10n.requestCodeEmailLabel, // More specific label
195
+ hintText : l10n.requestCodeEmailHint, // Added hint text
196
+ // border: const OutlineInputBorder(), // Uses theme default
192
197
),
193
198
keyboardType: TextInputType .emailAddress,
194
199
autocorrect: false ,
@@ -206,14 +211,20 @@ class _EmailLinkFormState extends State<_EmailLinkForm> {
206
211
const SizedBox (height: AppSpacing .lg),
207
212
ElevatedButton (
208
213
onPressed: widget.isLoading ? null : _submitForm,
209
- child:
210
- widget.isLoading
211
- ? const SizedBox (
212
- height: 24 ,
213
- width: 24 ,
214
- child: CircularProgressIndicator (strokeWidth: 2 ),
215
- )
216
- : Text (l10n.authenticationSendLinkButton),
214
+ style: ElevatedButton .styleFrom (
215
+ padding: const EdgeInsets .symmetric (vertical: AppSpacing .md),
216
+ textStyle: textTheme.labelLarge,
217
+ ),
218
+ child: widget.isLoading
219
+ ? SizedBox (
220
+ height: AppSpacing .xl, // Consistent size with text
221
+ width: AppSpacing .xl,
222
+ child: CircularProgressIndicator (
223
+ strokeWidth: 2 ,
224
+ color: colorScheme.onPrimary, // Color for loader on button
225
+ ),
226
+ )
227
+ : Text (l10n.requestCodeSendCodeButton), // More specific button text
217
228
),
218
229
],
219
230
),
0 commit comments