Role Switch Widget
Component Detail
User Interface
medium complexity
mobile
2
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
A UI widget accessible from the hamburger menu and profile screen that lists all roles and org/association combinations available to the authenticated user. Displays the currently active role with a clear visual indicator and triggers the role switch flow on selection. Must meet WCAG 2.2 AA touch target and contrast requirements.
role-switch-widget
Responsibilities
- Render all available UserRoleContext options fetched from Profile Switch Service
- Show a visual active-role indicator for the current selection
- Invoke Profile Switch Service on role selection and display a loading state during context re-initialization
- Meet WCAG 2.2 AA requirements: minimum 24x24 touch targets, 4.5:1 contrast, screen-reader labels
Interfaces
build(BuildContext context) → Widget
onRoleSelected(UserRoleContext roleContext) → void
displayActiveRole(UserRoleContext active) → void
Relationships
Dependencies (2)
Components this component depends on