render method

  1. @override
void render(
  1. Canvas canvas
)
override

Implementation

@override
void render(Canvas canvas) {
  super.render(canvas);
  if (_measuredWidth == null) {
    _measuredWidth = textConfig.measureTextWidth(text);
    _measuredHeight = textConfig.measureTextHeight(text);
    size = Vector2(_measuredWidth!, _measuredHeight!);
  }

  textConfig.render(
    canvas,
    text,
    Vector2(x, y),
  );
}