File tree 2 files changed +10
-6
lines changed 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -266,8 +266,12 @@ class ChooseAccountPage extends StatelessWidget {
266
266
// The default trailing padding with M3 is 24px. Decrease by 12 because
267
267
// IconButton (the "…" button) comes with 12px padding on all sides.
268
268
contentPadding: const EdgeInsetsDirectional .only (start: 16 , end: 12 ),
269
- onTap: () => Navigator .push (context,
270
- HomePage .buildRoute (accountId: accountId))));
269
+ onTap: () async {
270
+ final navigator = Navigator .of (context);
271
+ navigator.popUntil ((route) => route.isFirst);
272
+ unawaited (navigator.pushReplacement (
273
+ HomePage .buildRoute (accountId: accountId)));
274
+ }));
271
275
}
272
276
273
277
@override
Original file line number Diff line number Diff line change @@ -395,10 +395,10 @@ class _LoginPageState extends State<LoginPage> {
395
395
return ;
396
396
}
397
397
398
- unawaited ( Navigator .of (context). pushAndRemoveUntil (
399
- HomePage . buildRoute (accountId : accountId),
400
- (route) => (route is ! _LoginSequenceRoute )),
401
- );
398
+ final navigator = Navigator .of (context);
399
+ navigator. popUntil ((route) => route.isFirst);
400
+ unawaited ( Navigator . of (context). pushReplacement (
401
+ HomePage . buildRoute (accountId : accountId)) );
402
402
}
403
403
404
404
Future <int > _getUserId (String email, String apiKey) async {
You can’t perform that action at this time.
0 commit comments