Orders Routes
core/routing/app_router.dart · /orders + /orders/:orderId
Overview
Two GoRoutes inside the ShellRoute: /orders → OrdersScreen, /orders/:orderId → OrderDetailScreen. Both are role-aware at render time, not at routing time — the auth guard only checks isLoggedIn.
User Flow
- Home grid tile 'Panier' / 'Orders' navigates to /orders.
- OrderCard taps push /orders/:orderId with the path param.
- Detail screen reads pathParameters['orderId'] and feeds orderDetailProvider.
Cases & Edge Cases
- Deep-linking from a notification (FCM 'new order') jumps directly to /orders/:orderId — make sure orderDetailProvider can recover from a cold-start cache miss.
- No nested ShellRoute — the bottom nav stays visible on detail.
Code References
- lib/src/core/routing/app_router.dart:613 // /orders
- lib/src/core/routing/app_router.dart:619 // /orders/:orderId
API Calls
Empty — fill this in later. Open the manifest and add content here.
Notes
Receipt screen is pushed (not routed) from order detail — keep it out of the GoRouter table to avoid making it deep-linkable.