TextComponent
Uses Canvas to render text. This class utilizes StaticLayout and supports the following:
multi-line text with automatic line breaking
text truncation
text rotation
text backgrounds (any Component)
margins and padding
It’s recommended to create instances via TextComponent.build.
Types
Creates TextComponents. It’s recommended to use this via TextComponent.build.
Houses a TextComponent factory function.
Defines a TextComponent’s minimum width.
Properties
The text’s background. Use padding to set the padding between the text and the background.
The type of text truncation to be used when the text’s width exceeds the amount of available space. By default, text is truncated at the end, and an ellipsis (…) is used.
The margins around the background. This is applied even if background is null.
Defines the minimum width.
The padding between the text and the background. This is applied even if background is null.
The text alignment.
The font size (in sp).
Functions
Uses Canvas to draw this TextComponent.