TextGameComponent constructor

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

Implementation

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