Skip to content

Font Family

Use font-sans, font-serif, or font-mono to set the typeface of text content.


Style('font-sans ...', child: Text('The quick brown fox ...'))
Style('font-serif ...', child: Text('The quick brown fox ...'))
Style('font-mono ...', child: Text('The quick brown fox ...'))
ClassFont Family
font-sansInter (bundled)
font-serifRobotoSlab (bundled)
font-monoRobotoMono (bundled)
font-[<name>]Arbitrary family literal (silent fallback if not registered); a bare all-digit value resolves as a font weight instead — see Font Weight. Force the family interpretation with the family-name: hint, e.g. font-[family-name:123].
font-(family-name:--var)Resolved against theme-defined StyleThemeData.customProperties; the family-name: hint forces the family interpretation (needed for an all-digit family name) — e.g. font-(family-name:--var) behaves like font-[family-name:<value>]. Cascade-inherited or JS-set CSS variables remain out of scope.