Added page transition

This commit is contained in:
Juan Gilsanz Polo
2024-02-24 14:05:17 +01:00
parent 47953a0232
commit c8e49d6878
3 changed files with 29 additions and 12 deletions

View File

@@ -24,15 +24,7 @@ class Layout extends ConsumerWidget {
return OverlayStyle(
child: Scaffold(
body: PageTransitionSwitcher(
duration: const Duration(milliseconds: 200),
transitionBuilder: (child, primaryAnimation, secondaryAnimation) => FadeThroughTransition(
animation: primaryAnimation,
secondaryAnimation: secondaryAnimation,
child: child,
),
child: child,
),
body: child,
bottomNavigationBar: NavigationBar(
onDestinationSelected: (s) => ref.watch(routerProvider).replace(appScreens[s].route),
selectedIndex: screenIndex,