TextComponent<T extends TextRenderer> constructor

TextComponent<T extends TextRenderer>({
  1. String? text,
  2. T? textRenderer,
  3. Vector2? position,
  4. Vector2? size,
  5. Vector2? scale,
  6. double? angle,
  7. Anchor? anchor,
  8. Iterable<Component>? children,
  9. int? priority,
  10. ComponentKey? key,
})

Implementation

TextComponent({
  String? text,
  T? textRenderer,
  super.position,
  super.size,
  super.scale,
  super.angle,
  super.anchor,
  super.children,
  super.priority,
  super.key,
})  : _text = text ?? '',
      _textRenderer = textRenderer ?? TextRendererFactory.createDefault<T>() {
  updateBounds();
}