BundledFont enum

Fonts a theme may use. id is the stable string stored in a ThemeSpec's TypeSpec; family is the pubspec family name (null = platform default).

Inheritance
Available extensions

Values

platform → const BundledFont

Platform default UI font (M2 behaviour; the plain theme).

const BundledFont('platform', null, tabularByDefault: false)
robotoFlex → const BundledFont

Roboto Flex: Material 3 Expressive display and keys, and the settings/history UI face. Figures are tabular by default (the font has pnum, not tnum).

const BundledFont('roboto_flex', '${fontPackagePrefix}RobotoFlex', tabularByDefault: true, weight: FontAxisRange('wght', 100, 400, 1000), width: FontAxisRange('wdth', 2…
spaceGrotesk → const BundledFont

Space Grotesk: NeoPOP's chunky grotesque (weight 300–700, has tnum and slashed zero).

const BundledFont('space_grotesk', '${fontPackagePrefix}SpaceGrotesk', tabularByDefault: false, hasSlashedZero: true, weight: FontAxisRange('wght', 300, 300, 700))
nunito → const BundledFont

Nunito: Claymorphism's rounded heavy sans (weight 200–1000; digits equal width by default; default instance ExtraLight, so the axis is always set).

const BundledFont('nunito', '${fontPackagePrefix}Nunito', tabularByDefault: true, weight: FontAxisRange('wght', 200, 200, 1000))
openSans → const BundledFont

Open Sans: the Y2K / Frutiger Aero humanist sans, a sibling of the Vista / 7 system face (weight 300–800, width pinned at 100; tnum, slashed zero).

const BundledFont('open_sans', '${fontPackagePrefix}OpenSans', tabularByDefault: true, hasSlashedZero: true, weight: FontAxisRange('wght', 300, 400, 800))
newsreader → const BundledFont

Newsreader: Paper & ink's editorial serif (weight 200–800, optical size 6–72 follows the font size; tabular figures by default).

const BundledFont('newsreader', '${fontPackagePrefix}Newsreader', tabularByDefault: true, weight: FontAxisRange('wght', 200, 400, 800), opticalSize: FontAxisRange('opsz'…
oxanium → const BundledFont

Oxanium: Cyberpunk's squared techno face (weight 200–800, digits equal width by default, slashed zero).

const BundledFont('oxanium', '${fontPackagePrefix}Oxanium', tabularByDefault: true, hasSlashedZero: true, weight: FontAxisRange('wght', 200, 200, 800))
anybody → const BundledFont

Anybody: Vaporwave's extended 90s grotesque (weight 100–900, width 50–150; tnum, slashed zero).

const BundledFont('anybody', '${fontPackagePrefix}Anybody', tabularByDefault: false, hasSlashedZero: true, weight: FontAxisRange('wght', 100, 100, 900), width: FontAxisRange(&#…
jost → const BundledFont

Jost: Bauhaus's Futura-model geometric sans (weight 100–900, tnum).

const BundledFont('jost', '${fontPackagePrefix}Jost', tabularByDefault: false, weight: FontAxisRange('wght', 100, 400, 900))
patrickHand → const BundledFont

Patrick Hand: Paper & ink's handwritten chrome headings (settings and dialog titles, section headers). A static Regular with proportional figures, so it is never used for numbers or by the theme generator.

const BundledFont('patrick_hand', '${fontPackagePrefix}PatrickHand', tabularByDefault: false)

Properties

family → String?
Family name declared in pubspec.yaml, or null for the platform font.
final
grade → FontAxisRange?
GRAD axis (weight change without reflow), if any.
final
hashCode → int
The hash code for this object.
no setterinherited
hasSlashedZero → bool
Whether the font supports the zero (slashed zero) feature.
final
id → String
Stable id used in ThemeSpec JSON.
final
index → int
A numeric identifier for the enumerated value.
no setterinherited
isBundled → bool
Whether this is a bundled asset font (not the platform font).
no setter
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
opticalSize → FontAxisRange?
opsz axis, if any.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tabularByDefault → bool
Whether digits are already fixed-width without the tnum feature.
final
weight → FontAxisRange?
wght axis, if variable in weight.
final
width → FontAxisRange?
wdth axis, if any.
final

Methods

features({bool tabular = true, bool slashedZero = false}) → List<FontFeature>
OpenType features for this font. Tabular figures are on by default (calculator display, keys, history and settings values all align).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
style({double? fontSize, double weight = 400, double? width, double? grade, double? opticalSize, bool tabular = true, bool slashedZero = false, double? height, double? letterSpacing}) → TextStyle
A complete TextStyle for this font. weight is a CSS-style weight (Roboto Flex accepts 100–1000); fontWeight is set to the nearest FontWeight so platform fallback glyphs match.
toString() → String
A string representation of this object.
inherited
variations({double weight = 400, double? width, double? grade, double? opticalSize, double? fontSize}) → List<FontVariation>
Variation-axis settings, clamped to this font's ranges; axes the font does not have are omitted. weight defaults to Regular 400 (clamped, so Space Grotesk never renders at its Light default by accident). opticalSize defaults to fontSize when given (auto optical sizing).

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromFamily(String? family) → BundledFont
Looks up a font by its pubspec family name (null → platform).
fromId(String? id) → BundledFont
Looks up a font by its stable id; unknown ids fall back to platform so an older app never fails on a newer theme.

Constants

values → const List<BundledFont>
A constant List of the values in this enum, in order of their declaration.