Skip to content

Commit 0284c9c

Browse files
committed
refactor(router): simplify AccountLinking page transition
- Remove CustomTransitionPage for modal bottom sheet presentation - Revert to using a simpler builder function for AccountLinking route - This change reduces complexity and improves performance for account linking flow
1 parent ed39e56 commit 0284c9c

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed

lib/router/router.dart

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -201,29 +201,12 @@ GoRouter createRouter({
201201
GoRoute(
202202
path: Routes.accountLinking,
203203
name: Routes.accountLinkingName,
204-
// Use CustomTransitionPage to create a modal bottom sheet presentation.
205-
pageBuilder: (context, state) {
206-
return CustomTransitionPage<void>(
207-
// Set opaque to false to allow the underlying page to be visible.
208-
opaque: false,
209-
// Allow dismissing the modal by tapping outside the sheet.
210-
barrierDismissible: true,
211-
// Define the slide-up transition for the modal bottom sheet.
212-
transitionsBuilder: (context, animation, secondaryAnimation, child) {
213-
return SlideTransition(
214-
position: Tween<Offset>(
215-
begin: const Offset(0, 1), // Start from bottom
216-
end: Offset.zero, // Slide to its final position
217-
).animate(animation),
218-
child: child,
219-
);
220-
},
221-
child: BlocProvider(
222-
create: (context) => AuthenticationBloc(
223-
authenticationRepository: context.read<AuthRepository>(),
224-
),
225-
child: const AccountLinkingPage(),
204+
builder: (context, state) {
205+
return BlocProvider(
206+
create: (context) => AuthenticationBloc(
207+
authenticationRepository: context.read<AuthRepository>(),
226208
),
209+
child: const AccountLinkingPage(),
227210
);
228211
},
229212
routes: [

0 commit comments

Comments
 (0)