TextComponent constructor
TextComponent(
- String _text,
- RenderComponent renderComponent, {
- TextStyle? style,
Implementation
TextComponent(this._text, RenderComponent renderComponent, {TextStyle? style})
: _textStyle = style ?? defaultTextStyle,
_textPainter = TextPainter(textDirection: TextDirection.ltr),
_drawable = DrawableText() {
setPhase(ComponentPhases.preDraw);
renderComponent.drawable = _drawable..textPainter = _textPainter;
}