Navigation State Store
Component Detail
Data Layer
medium complexity
mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
A Riverpod provider (or BLoC) that holds and exposes the current active tab index, the authenticated user's role, and any pending deep link destination. Acts as the reactive source of truth for the Bottom Navigation Bar and Navigation Shell Widget, ensuring consistent UI state across the shell.
navigation-state-store
Responsibilities
- Persist and expose the current active tab index
- Expose the current user role for role-aware nav rendering
- Store pending deep link destination for post-auth navigation
- Notify shell widgets when navigation state changes
- Reset state on logout or session expiry
Interfaces
getCurrentTabIndex()
setCurrentTabIndex(int index)
getUserRole()
setPendingDeepLink(Uri uri)
consumePendingDeepLink()
resetState()
watchTabIndex()
watchUserRole()