render method
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),
);
}