App Router Service
Component Detail
Service Layer
high complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Configures and manages the go_router instance with StatefulShellRoute for branch-based tab navigation with preserved state. Applies role-based route guards using Riverpod providers that reactively respond to Supabase authentication state changes, and configures deep link support for notification-triggered navigation.
app-router-service
Responsibilities
- Define all named routes and shell branches for the five tabs
- Apply role-based redirect guards at the shell level
- Configure deep link URL schemes for push notification navigation
- Preserve tab state across navigation events via StatefulShellRoute
- Expose navigation helpers (push, replace, pop, go) to the rest of the app
Interfaces
buildRouter()
go(String location)
push(String location)
pop()
replace(String location)
redirect(BuildContext context, GoRouterState state)
getRouteForRole(UserRole role)
handleDeepLink(Uri uri)
refreshListenable()