Skip to main content

WP-11 Flutter spec

Theme and kit for every role shell. Decision: ADR 0012. Token source: stitch_afia_admin/afia_design_system/DESIGN.md in AFIA-resources/stitch_afia_admin-1.zip. Wire: exchange/design-system.md.

Usage​

MaterialApp uses AfiaTheme.light(). Arabic locales swap the text theme to Noto Sans Arabic. Screens in WP-13 to WP-16 import widgets from lib/presentation/kit/ and labels from AppLocalizations.

Domain​

None. The kit holds no health data.

Models​

  • AfiaColors at lib/core/theme/afia_colors.dart. Constants for the DESIGN.md color tokens. primary #003b5a, primaryContainer #1a5276, surface #f7f9ff, onSurface #091d2e, secondary #006397, tertiary #00401e, error #ba1a1a, and the surface container steps.
  • AfiaType at lib/core/theme/afia_type.dart. Manrope headings (h1 28 mobile, h2 28, h3 22). Noto Sans body (lg 18, md 16, label 14). Noto Sans Arabic for ar.
  • AfiaShape at lib/core/theme/afia_shape.dart. Radii 8 and 12. Card shadow 0 2px 8px rgba(0,0,0,.08). Page margin 16. Stack gap 12.
  • AfiaTheme at lib/core/theme/afia_theme.dart. Builds Material 3 ThemeData from the three above.

Kit widgets under lib/presentation/kit/:

AfiaAppBar(title, actions?)
AfiaCard(child, onTap?)
AfiaListTile(leading?, title, subtitle?, trailing?)
AfiaStatusChip(label, tone) tone: neutral | success | warning | error
AfiaPrimaryButton(label, onPressed)
AfiaSecondaryButton(label, onPressed)
AfiaSectionHeader(title, action?)
AfiaEmptyState(icon, message)
AfiaBottomBar(items, index, onTap)

Icons come from material_symbols_icons as Symbols.*.

Data sources​

None.

tool/merge_l10n.py reads l10n-src/*.json. Each file maps a key to { "en", "fr", "ar" }. It writes lib/l10n/app_en.arb, app_fr.arb, and app_ar.arb in key order. A duplicate key across files fails the run.

Repositories​

None.

Does not do​

Screens. Repositories. A second HTTP client. Runtime font downloads. Copying the side-by-side French and Arabic Stitch text.