tokens/typography.dart as DesignSystemTypography, a ThemeExtension accessed via context.textTheme.
The two typefaces
Weights are set with
fontVariations: [FontVariation.weight(n)] rather than fontWeight. That’s what enables the body styles’ signature weight 425 — an in-between weight only a variable font can render.
Full spec
Notable details:
- Overlines are the only styles with positive (wide) letter spacing — they’re for small uppercase-feel labels.
- Display styles have a tight 1.0 line height; body styles breathe at 1.5.
- Sizes are logical pixels;
heightis a multiplier offontSize(Flutter semantics).
The samples on this site render in the docs theme’s fonts, not the app’s — refer to the spec table for exact metrics, or run the app to see the real thing.
Category guidance
Color variants
Three static instances:DesignSystemTypography.base— colorless; the styles as pure metricsDesignSystemTypography.light— every style colored parchment 800 (272725) — migrating tocontentPrimarywhen the 1.0 ramps are deletedDesignSystemTypography.dark— every style colored parchment 200 (DDDAD1)
AppTheme installs .light/.dark as the ThemeExtension, so context.textTheme styles arrive pre-colored for the current mode. Override color per-use with copyWith:
Font assets
Declared inpubspec.yaml under fonts::
Material TextTheme bridge
AppTheme also maps these tokens into Flutter’s stock TextTheme so Material widgets and third-party code pick them up: DS display/title/body map to their Material namesakes, and DS overline styles fill Material’s label* slots — all colored contrastStrong. See Material bridge.