Active Chapter State (BLoC)
Component Detail
Service Layer
low complexity
frontendmobile
0
Dependencies
1
Dependents
2
Entities
0
Integrations
Description
Riverpod/BLoC state management for the currently selected chapter context when a user belongs to multiple chapters. Persists selection to local storage, exposes the active unit ID to all widgets, and broadcasts change events when the user switches chapters via the chapter switcher.
active-chapter-state
Responsibilities
- Hold and expose the active organization unit ID for the session
- Persist selection to local secure storage
- Notify all listeners on chapter switch
- Reset state on logout
Interfaces
getActiveUnitId()
setActiveUnit(unitId)
watchActiveUnit()
clearActiveUnit()
loadPersistedUnit(userId)
Relationships
Related Data Entities (2)
Data entities managed by this component