User Interface high complexity mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

A shared internal Flutter widget library (lib/shared/widgets) providing all common UI primitives — AppButton, AppTextField, page headers, modal helpers, role switch widget, and custom fields table. All widgets are pre-wired for semantic accessibility labels and consume design tokens from the ThemeExtension. This library is the single source of styled, accessible UI components that all feature teams import and use directly.

Feature: Design Token System

reusable-widget-library

Responsibilities

  • Provide pre-styled, accessible Flutter widgets for all feature teams
  • Enforce design token usage by wrapping raw Flutter widgets
  • Expose semantic labels and ARIA-equivalent properties for screen readers
  • Support both default and high-contrast theme variants automatically

Interfaces

AppButton({label, onPressed, variant, isLoading})
AppTextField({label, controller, obscureText, semanticLabel})
AppPageHeader({title, subtitle, backAction})
AppModalCloseButton({onClose})
RoleSwitchWidget({currentRole, availableRoles, onSwitch})
CustomFieldsTable({fields, values, onEdit})
AppBottomNav({selectedIndex, onTabSelected})
AppCard({child, onTap, padding})
AppBadge({label, accent})
AppDivider()
AppLoadingIndicator({semanticLabel})
AppEmptyState({icon, title, message, action})

Sub-Components (2)

AppButton
component low

Standardized button widget with primary, secondary, and destructive variants, loading state, and enforced minimum touch target (48dp) per WCAG 2.2 AA.

  • Render button with correct token-based styling per variant
  • Show loading spinner and disable interaction during async operations
  • Enforce 48dp minimum touch target
AppTextField
component low

Accessible text input widget with label, error state, obscure text toggle, and semantic label support for screen readers.

  • Render input with token-based border, focus, and error colors
  • Expose semantic labels for VoiceOver/JAWS
  • Emit sensitive field audio warnings when configured

Related Data Entities (1)

Data entities managed by this component