HOCO B2B
Team tasksImad

MOB-04 — Flutter design system — tokens, theme, components

hoco_ui: Akram's tokens as ThemeData + ThemeExtensions, typography, the mobile component library and a widget gallery app for design QA.

FieldDetails
Task codeMOB-04
PhaseP0 — Foundations (cadrage, UX/UI, architecture & contract)
Product scopeV1
StatusPlanned
StartWed 21 Oct 2026
DueSun 25 Oct 2026
ResponsibleImad — Mobile developer (Flutter)
Co-responsible—
Effort2.5 person-day(s) planned · 8 from scratch · size M
Area · appMobile foundation · mobile
Depends onDES-03, MOB-01
UnblocksMOB-05
Milestones—

Summary

hoco_ui: Akram's tokens as ThemeData + ThemeExtensions, typography, the mobile component library and a widget gallery app for design QA.

Description

Akram designs every mobile screen on one component library (DES-03), and the Flutter apps must reproduce it exactly so design QA checks screens rather than re-litigating buttons. Scope: hoco_ui with tokens generated from Akram's Claude Design tokens (the exported token file), ThemeData plus ThemeExtensions, typography, the full mobile component set (inputs, steppers, chips, status badges, product/order/visit/KPI cards, list rows, app bars, bottom nav, tabs, sheets, dialogs, snackbars, skeletons, empty/error states) and a widget gallery Akram can install. Business logic and screens are out of scope. It needs DES-01…03 from Akram (tokens export, components, icons, font files) and no server work. Components bake in two product rules: availability is a pill without quantities (STK-07) and a price can be locked for guests (AUTH-10). Every screen task builds on this package and DQA reviews start from the gallery.

Subtasks

#SubtaskOwner
1Token pipeline: token file exported from Claude Design (JSON) → tool/gen_tokens.dart → colors, spacing scale, radii, elevation and typography as generated DartImad
2HocoTheme (ThemeData + ThemeExtension<HocoColors>, <HocoStatusTones>) with a high-contrast variant for the delegate app's outdoor use, agreed with AkramImad
3Bundle the DES-01 font family with an Arabic-capable fallback; TextTheme mapping and a text-scale clamp (1.0–1.3)Imad
4Inputs: HocoButton (primary, secondary, ghost, destructive, loading), HocoTextField, HocoPhoneField (+213), HocoPasswordField, HocoOtpField (6 digits), HocoSearchablePicker (wilaya/commune), HocoQuantityStepper (min, step, max)Imad
5Display: HocoStatusBadge driven by enum tone, AvailabilityPill taking only StockAvailability (« En stock » / « En rupture »), PriceText (HT/TTC, promo strike-through, locked state « Créez un compte pour voir les prix »), ProductCard, OrderCard with progress tracker, VisitCard, KpiTile, ListRowImad
6Containers and feedback: HocoAppBar, HocoBottomNav with badges, HocoTabs, HocoBottomSheet, HocoDialog, HocoSnackbar, skeleton loaders, EmptyState, ErrorState (retry + requestId), OfflineBanner, SyncStatusPill (synced / pending / error)Imad
7Icon set exported by Akram as SVG (flutter_svg) or an icon font, with semantic labelsImad
8Widget gallery app (packages/hoco_ui/example or Widgetbook) built as an APK by CI for design QAImad
9Design QA pass on the gallery against DES-03 with written findingsAkram
10Golden tests for every component in default, disabled, error and loading states, LTR and RTLImad

Deliverables

  • packages/hoco_ui/lib/src/tokens/ (generated), theme/, components/
  • packages/hoco_ui/example gallery app and its CI APK artifact
  • packages/hoco_ui/test/goldens/ baseline images

Acceptance criteria

  • Every DES-03 component exists in hoco_ui under the Claude Design name and is shown in the gallery
  • Tokens regenerate from a new Claude Design token export with one command and no hand edits
  • Touch targets are at least 48 dp and text/background token pairs reach 4.5:1 contrast (NFR-07)
  • AvailabilityPill has no quantity parameter; PriceText renders the lock state when the price is null
  • Akram signs off the gallery with no blocking finding

Requirements covered

RequirementTitleRelease
NFR-07Accessibility: readable contrast, reachable buttons, consistent text sizes, explicit messagesV1

Test measures

  • Golden tests (alchemist or golden_toolkit) per component, LTR and RTL, run on the Linux CI runner with bundled fonts
  • Widget tests of HocoQuantityStepper bounds (min, step, max) and HocoOtpField paste handling
  • Unit test computing contrast ratios of the token pairs used for text

Risks

  • DES-03 changes after implementation — build tokens first and keep component APIs stable so visual changes are token edits; weekly 30-minute sync with Akram
  • Golden images differ between developer machines and CI — generate and compare goldens on CI only

KPI

  • Delivered by Sun 25 Oct 2026 within 2.5 person-day(s).
  • Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
  • Zero open critical defects, permission gaps or data-integrity regressions at sign-off.

Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.

On this page