TextGameComponent constructor

TextGameComponent({
  1. required String text,
  2. required Vector2 position,
  3. String name = '',
  4. TextStyle? style,
})

Implementation

TextGameComponent({
  required this.text,
  required Vector2 position,
  this.name = '',
  TextStyle? style,
}) {
  this.position = position;
  _textPaint = TextPaint(
    style: style,
  );
}