Data Layer low complexity mobile
1
Dependencies
2
Dependents
0
Entities
0
Integrations

Description

BLoC managing the lifecycle of dashboard screen state including loading, loaded, and error states. Drives reactive UI updates for both PeerMentorHomeScreen and CoordinatorHomeScreen using Flutter BLoC pattern.

Feature: Role-Specific Home Dashboard

dashboard-state-bloc

Responsibilities

  • Emit DashboardLoadingState on fetch initiation to trigger skeleton loaders
  • Emit DashboardLoadedState with typed view model data on successful API response
  • Emit DashboardErrorState with user-friendly localized message on fetch failure
  • Handle DashboardRefreshEvent to trigger pull-to-refresh data reload

Interfaces

add(DashboardEvent event) → void
state → DashboardState
DashboardLoadEvent(UserRole role)
DashboardRefreshEvent()
DashboardLoadedState(dynamic data)
DashboardErrorState(String message)

Relationships

Dependencies (1)

Components this component depends on

Dependents (2)

Components that depend on this component