Parameters
The font specification. Can be a predefined text style, a numeric font size, or a custom font configuration.
Sets the font for text display.
.font(style?: TextStyle | number | CustomFont): Component;
Text("Large title text")
.font("largeTitle")
Text("Custom sized text")
.font(18)
Text("Body text")
.font("body")