@@ -48,20 +48,18 @@ class AuthenticationPage extends StatelessWidget {
48
48
backgroundColor: Colors .transparent,
49
49
elevation: 0 ,
50
50
// Conditionally add the leading close button only in linking context
51
- leading:
52
- isLinkingContext
53
- ? IconButton (
54
- icon: const Icon (Icons .close),
55
- tooltip:
56
- MaterialLocalizations .of (
57
- context,
58
- ).closeButtonTooltip, // Accessibility
59
- onPressed: () {
60
- // Navigate back to the account page when close is pressed
61
- context.goNamed (Routes .accountName);
62
- },
63
- )
64
- : null , // No leading button if not linking (relies on system back if pushed)
51
+ leading: isLinkingContext
52
+ ? IconButton (
53
+ icon: const Icon (Icons .close),
54
+ tooltip: MaterialLocalizations .of (
55
+ context,
56
+ ).closeButtonTooltip, // Accessibility
57
+ onPressed: () {
58
+ // Navigate back to the account page when close is pressed
59
+ context.goNamed (Routes .accountName);
60
+ },
61
+ )
62
+ : null , // No leading button if not linking (relies on system back if pushed)
65
63
),
66
64
body: SafeArea (
67
65
child: BlocConsumer <AuthenticationBloc , AuthenticationState >(
@@ -130,15 +128,16 @@ class AuthenticationPage extends StatelessWidget {
130
128
// --- Email Sign-In Button ---
131
129
ElevatedButton .icon (
132
130
icon: const Icon (Icons .email_outlined),
133
- onPressed:
134
- isLoading
135
- ? null
136
- : () {
137
- context.goNamed (
138
- Routes .requestCodeName,
139
- extra: isLinkingContext,
140
- );
141
- },
131
+ onPressed: isLoading
132
+ ? null
133
+ : () {
134
+ context.goNamed (
135
+ Routes .requestCodeName,
136
+ queryParameters: isLinkingContext
137
+ ? {'context' : 'linking' }
138
+ : const {},
139
+ );
140
+ },
142
141
label: Text (l10n.authenticationEmailSignInButton),
143
142
style: ElevatedButton .styleFrom (
144
143
padding: const EdgeInsets .symmetric (
@@ -153,12 +152,11 @@ class AuthenticationPage extends StatelessWidget {
153
152
if (showAnonymousButton) ...[
154
153
OutlinedButton .icon (
155
154
icon: const Icon (Icons .person_outline),
156
- onPressed:
157
- isLoading
158
- ? null
159
- : () => context.read <AuthenticationBloc >().add (
160
- const AuthenticationAnonymousSignInRequested (),
161
- ),
155
+ onPressed: isLoading
156
+ ? null
157
+ : () => context.read <AuthenticationBloc >().add (
158
+ const AuthenticationAnonymousSignInRequested (),
159
+ ),
162
160
label: Text (l10n.authenticationAnonymousSignInButton),
163
161
style: OutlinedButton .styleFrom (
164
162
padding: const EdgeInsets .symmetric (
0 commit comments