Custom Text Style Properties
| Property | Type | Description |
|---|---|---|
| inherit | bool? | Whether to inherit from ambient DefaultTextStyle. |
| color | String? | Text color. |
| backgroundColor | String? | Background color behind text. |
| fontSize | double? | Font size in logical pixels. |
| fontWeight | String? | Font weight (normal, bold, w100-w900). |
| fontStyle | String? | Font style: normal or italic. |
| letterSpacing | double? | Spacing between letters. |
| wordSpacing | double? | Spacing between words. |
| textBaseline | String? | Baseline alignment. |
| height | double? | Line height as multiple of font size. |
| decorationColor | String? | Color for text decorations. |
| decorationStyle | String? | Decoration style: solid, dotted, dashed, wavy. |
| decorationThickness | double? | Thickness of decorations. |
| fontFamily | String? | Font family name. |
| fontFamilyFallback | List? | Fallback font families. |
| overflow | String? | Text overflow: clip, fade, ellipsis, visible. |
Basic Example
Font Weights
Available font weights:| Value | Description |
|---|---|
w100 | Thin |
w200 | Extra Light |
w300 | Light |
w400 | Normal (default) |
w500 | Medium |
w600 | Semi Bold |
w700 | Bold |
w800 | Extra Bold |
w900 | Black |
normal | Same as w400 |
bold | Same as w700 |
Text Decorations
Theme-Based Text Style
Use theme text styles to follow Material Design typography:| Theme Style | Description |
|---|---|
displayLarge | Largest display text |
displayMedium | Medium display text |
displaySmall | Small display text |
headlineLarge | Largest headline |
headlineMedium | Medium headline |
headlineSmall | Small headline |
titleLarge | Largest title |
titleMedium | Medium title |
titleSmall | Small title |
bodyLarge | Large body text |
bodyMedium | Medium body text (default) |
bodySmall | Small body text |
labelLarge | Large label (buttons) |
labelMedium | Medium label |
labelSmall | Small label |