TextInterfaceComponent constructor

TextInterfaceComponent({
  1. required int id,
  2. required Vector2 position,
  3. String text = '',
  4. ValueChanged<bool>? onTapComponent,
  5. TextStyle? textConfig,
})

Implementation

TextInterfaceComponent({
  required int id,
  required Vector2 position,
  this.text = '',
  ValueChanged<bool>? onTapComponent,
  TextStyle? textConfig,
}) : super(
        id: id,
        position: position,
        size: Vector2.zero(),
        onTapComponent: onTapComponent,
      ) {
  this.textConfig = TextPaint(style: textConfig);
}