3aeb09d61f
background, foreground, subdued, accent (emphasis without danger), and the state gradient good → caution → alarm; surface and onFill derived. smart-serow's four-key themes still load (highlight = alarm; the new roles fall back). Material's scheme follows: buttons in accent instead of the alarm colour. Link state, mock banner, signal tiles, raw log, checklist button and marks, camera page all take palette roles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
type
| type |
|---|
| reference |
The app's code: a catalogue
Laid out like smart-serow's HUD (pi/ui/lib/), which several pieces come from.
Folders
| Where | Holds |
|---|---|
lib/*.dart |
Pages (dash, checklist, camview, linktest), the boundary client (boundary), the USB network binding (net), and reading, one signal's state as a display needs it |
theme/ |
palette.dart: the palette and hudFont |
widgets/ |
Reusable display widgets, one per file, each fed values, never the boundary |
Widgets
| Widget | File | Shows | From |
|---|---|---|---|
StatBox, StatBoxMain |
widgets/stat_box.dart |
A value, its unit and label, sized from its box's height; alarm on warning, subdued when dim | smart-serow |
Telltale |
widgets/telltale.dart |
An on/off lamp: a label or an icon, lit or dark, "—" when missing | Yukart |
WhiskeyMark |
widgets/whiskey_mark.dart |
Attitude: a horizon tilting with roll, ladder moving with pitch | smart-serow |
AccelGraph |
widgets/accel_graph.dart |
G-meter: a dot for lateral/longitudinal g, a trace and a peak marker over a window | smart-serow |
GpsCompass |
widgets/gps_compass.dart |
Heading arrow and bearing; "ACQ" while acquiring, "N/A" without | smart-serow, from gps-speedo |
Conventions
- The boxed pattern. A widget takes its share of a row and sizes its type from its own height, so a layout is a grid of boxes and a value gaining a digit never moves anything. Labels shrink to fit, never wrap.
- Colours by meaning.
AppTheme.of(context)gives seven roles:background,foreground,subdued(muted, missing, stale),accent(emphasis without danger: buttons, links, the current item), and the state gradientgood→caution→alarm; plus the derivedsurface(raised bars) andonFill(colour)(text on a fill). No widget names a colour. Themes are JSON inassets/themes/,reiby default; smart-serow's four-key files still load (theirhighlightisalarm). - Cosmetic fonts are opt-in. A widget that wants the HUD face names
fontFamily: hudFontin its ownTextStyle; everything else keeps the basic font, which covers CJK where DIN 1451 does not. - Missing is a state (app guideline 2): a widget given no value draws "—" or subdued, never an error.