Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

11 — Design System Mapping (Homework Module)

Homework module → Material 3 / Flutter / token mapping, extending 00-shared/04. Every color, type, spacing, elevation, radius, icon, motion reference traces to 00-shared/02_Design_Tokens.md.


1. Theme recipes (module)

SurfaceThemeException
Lists & cardssurface / surfaceContainerLow, e-0/e-1selected (master-detail) → primaryContainer
Status chipssecondaryContainer (active/graded), tertiaryContainer (pending/late), outline (closed/not submitted)
Grade feedback cardCard.filled secondaryContainermarks in onSecondaryContainer
Warning surfaces (late, regrade, past due)tertiaryContainericon + text, never color-only
Destructive (delete/regrade confirm)error / errorContainerAppDialog destructive action

2. Widget → token

ComponentM3 / FlutterTokensElevRadius
HomeworkCardCardsurfaceContainerLowe-0/e-1r-md
Subject chipChipsurfaceVariantr-sm
Status badge activeBadgesecondaryContainerr-sm
Status badge closedBadgeoutliner-sm
LateBadgeBadge + icontertiaryContainer / tertiaryr-sm
SubmissionRowCard + ListTilesurfaceContainerLowe-0r-md
GradeFeedbackCardCard.filledsecondaryContainere-1r-lg
Create/Edit/Submit form fieldsTextFormFieldfill surfaceVariant, border outline, focus primaryr-md
Primary CTA (submit/grade)FilledButtonprimary/onPrimaryr-md
Secondary (submissions, add attachment)OutlinedButtonoutline/onSurfacer-md
FAB "New homework"FloatingActionButton.extendedprimaryContainere-3r-full
Delete/regrade confirmAppDialogsurfaceContainerHigh, destructive errore-4r-lg
Attachment upload tileListTile + LinearProgressIndicatorsurfaceVariant track, primary progressr-md
SnackbarSnackBarinverseSurfacee-5r-md
Offline bannerAppOfflineBannertertiaryContainere-1

3. Typography mapping

TokenScreen element
headlineMediumscreen titles (Homework list, detail header)
titleLargeAppBar titles, create-form header
titleMediumcard titles, submission row names, section headers
bodyLargehomework description fallback (pre-markdown)
bodyMediummeta lines (class, teacher, due), form labels
bodySmalltimestamps, "Submitted 3d ago", helper text
labelLargebuttons, chips
labelMediumbadges ("Late · 2d", "Graded")
displaySmallmarks in GradeFeedbackCard
monomarks, attachment sizes (tabularFigures())

4. Iconography

Material Symbols outlined: assignment, assignment_turned_in, schedule, event, attach_file, upload_file, download, description, picture_as_pdf, edit, delete, check_circle, warning, error, refresh, grade, person, school. Status icons use filled variants (submitted check, graded star).

5. Motion tokens (values 00-shared/02 §6)

PurposeTokenApplied to
List→detail transitionm-basenavigation
Hero on card→detail titlem-slowdetail open
Status chip morphm-fastsubmitted→graded
Upload progress updatesm-instantdeterminate bars
Card entrance staggerm-entrance (40 ms)list load
Badge pop (marks appear)m-fastgrade result
Row removal (delete)m-baselist

Rules: reduced-motion substitutes fades/instants (08 §4).

6. Contrast & dark parity

  • Body text ≥ 4.5:1; interactive chrome ≥ 3:1 (both modes).
  • Dark: secondaryContainer dark variant (chromatic roles TBD by designer, 02 §1.4); late badge warning text on warningContainer verified for contrast.
  • No sole-color status: every badge pairs icon + text (09 §9).
  • Marks read as text, not color (tabularFigures).

7. Breakpoint behaviour

ClassListDetail/Forms
phone <600single column, FAB, swipe actionspush navigation, full-screen forms
600–8392-col gridmaster-detail
≥12003-col grid or list+detail panesgrade sheet splits: submissions list left, form right

8. Theming rules (enforced)

  1. No literal Color/padding/duration in widget code — tokens only (00-shared/04 §7).
  2. Tenant branding overrides primary only; badges derive from roles, not branding.
  3. Dark mode is a first-class theme (badges re-tinted, contrast re-verified).