add slide to stock and cleanup

This commit is contained in:
Patrick Alvin Alcala 2025-04-04 10:11:48 +08:00
parent b892cc485f
commit 1222f15766
5 changed files with 17 additions and 39 deletions

View file

@ -179,10 +179,24 @@ final _router = GoRouter(
child: child),
),
),
// GoRoute(
// name: 'addstock',
// path: '/addstock',
// builder: (context, state) => const AddStockPage(),
// ),
GoRoute(
name: 'addstock',
path: '/addstock',
builder: (context, state) => const AddStockPage(),
pageBuilder: (BuildContext context, GoRouterState state) => CustomTransitionPage<void>(
key: state.pageKey,
child: const AddStockPage(),
transitionsBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation,
Widget child) =>
SlideTransition(
position: animation.drive(
Tween<Offset>(begin: Offset(0.95, 0), end: Offset.zero).chain(CurveTween(curve: Curves.easeIn))),
child: child),
),
),
// GoRoute(
// name: 'liststocks',