@@ -97,76 +97,80 @@ class AuthenticationPage extends StatelessWidget {
97
97
MainAxisAlignment .center, // Center vertically
98
98
crossAxisAlignment: CrossAxisAlignment .stretch,
99
99
children: [
100
- // --- Hardcoded Icon ---
100
+ // --- Icon ---
101
101
Padding (
102
- padding: const EdgeInsets .only (
103
- bottom: AppSpacing .xl,
104
- ), // Spacing below icon
102
+ padding: const EdgeInsets .only (bottom: AppSpacing .xl),
105
103
child: Icon (
106
- Icons .security, // Hardcode the icon
107
- size:
108
- (Theme .of (context).iconTheme.size ??
109
- AppSpacing .xl) *
110
- 3.0 ,
111
- color: Theme .of (context).colorScheme.primary,
104
+ Icons .security,
105
+ size: AppSpacing .xxl * 2 , // Standardized large icon
106
+ color: colorScheme.primary,
112
107
),
113
108
),
114
- const SizedBox (
115
- height: AppSpacing .lg,
116
- ), // Space between icon and headline
109
+ // const SizedBox(height: AppSpacing.lg), // Removed, padding above handles it
117
110
// --- Headline and Subheadline ---
118
111
Text (
119
112
headline,
120
- style: textTheme.headlineMedium,
113
+ style: textTheme.headlineMedium? .copyWith (
114
+ fontWeight: FontWeight .bold, // Ensure prominence
115
+ ),
121
116
textAlign: TextAlign .center,
122
117
),
123
- const SizedBox (height: AppSpacing .sm),
118
+ const SizedBox (height: AppSpacing .md), // Increased spacing
124
119
Text (
125
120
subHeadline,
126
- style: textTheme.bodyLarge,
121
+ style: textTheme.bodyLarge? .copyWith (
122
+ color: colorScheme.onSurfaceVariant, // Softer color
123
+ ),
127
124
textAlign: TextAlign .center,
128
125
),
129
126
const SizedBox (height: AppSpacing .xxl),
127
+
130
128
// --- Email Sign-In Button ---
131
- ElevatedButton (
132
- // Consider an email icon
133
- // icon: const Icon(Icons.email_outlined),
134
- onPressed :
135
- isLoading
136
- ? null
137
- : () {
138
- // Navigate to the dedicated email sign-in page ,
139
- // passing the linking context via 'extra'.
140
- context. goNamed (
141
- Routes .requestCodeName ,
142
- extra : isLinkingContext,
143
- );
144
- } ,
145
- // Consider an email icon
146
- // icon: const Icon(Icons.email_outlined) ,
147
- child : Text (l10n.authenticationEmailSignInButton ),
129
+ ElevatedButton . icon (
130
+ icon : const Icon ( Icons .email_outlined),
131
+ onPressed : isLoading
132
+ ? null
133
+ : () {
134
+ context. goNamed (
135
+ Routes .requestCodeName,
136
+ extra : isLinkingContext ,
137
+ );
138
+ },
139
+ label : Text (l10n.authenticationEmailSignInButton) ,
140
+ style : ElevatedButton . styleFrom (
141
+ padding : const EdgeInsets . symmetric (
142
+ vertical : AppSpacing .md ,
143
+ ),
144
+ textStyle : textTheme.labelLarge ,
145
+ ),
148
146
),
147
+ const SizedBox (height: AppSpacing .lg),
149
148
150
149
// --- Anonymous Sign-In Button (Conditional) ---
151
150
if (showAnonymousButton) ...[
152
- const SizedBox (height: AppSpacing .lg),
153
- OutlinedButton (
154
- onPressed:
155
- isLoading
156
- ? null
157
- : () => context.read <AuthenticationBloc >().add (
151
+ OutlinedButton .icon (
152
+ icon: const Icon (Icons .person_outline),
153
+ onPressed: isLoading
154
+ ? null
155
+ : () => context.read <AuthenticationBloc >().add (
158
156
const AuthenticationAnonymousSignInRequested (),
159
157
),
160
- child: Text (l10n.authenticationAnonymousSignInButton),
158
+ label: Text (l10n.authenticationAnonymousSignInButton),
159
+ style: OutlinedButton .styleFrom (
160
+ padding: const EdgeInsets .symmetric (
161
+ vertical: AppSpacing .md,
162
+ ),
163
+ textStyle: textTheme.labelLarge,
164
+ ),
161
165
),
162
166
],
163
167
164
- // --- Loading Indicator (Optional, for general loading state) ---
165
- // If needed, show a general loading indicator when state is AuthenticationLoading
166
- if (isLoading &&
167
- state is ! AuthenticationRequestCodeLoading ) ...[
168
- const SizedBox (height : AppSpacing .xl ),
169
- const Center (child : CircularProgressIndicator () ),
168
+ // --- Loading Indicator ---
169
+ if (isLoading && state is ! AuthenticationRequestCodeLoading ) ...[
170
+ const Padding (
171
+ padding : EdgeInsets . only (top : AppSpacing .xl),
172
+ child : Center (child : CircularProgressIndicator () ),
173
+ ),
170
174
],
171
175
],
172
176
),
0 commit comments