Service Layer low complexity mobile
2
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Determines which home screen widget subtree to render at build time based on the authenticated user's role extracted from JWT claims via BLoC state. Eliminates runtime role-switching complexity by statically selecting the correct home screen.

Feature: Role-Specific Home Dashboard

role-screen-router

Responsibilities

  • Extract user role from JWT claims via the Auth BLoC state at widget build time
  • Route to PeerMentorHomeScreen or CoordinatorHomeScreen based on resolved role
  • Handle unknown or unsupported roles (e.g., Global Admin) with an appropriate redirect screen

Interfaces

resolveHomeScreen(UserRole role) → Widget
buildHomeWidget(BuildContext context) → Widget

Relationships

Dependencies (2)

Components this component depends on

Related Data Entities (2)

Data entities managed by this component