render method
Implementation
@override
void render(Canvas canvas) {
super.render(canvas);
if (_measuredWidth == null) {
_measuredWidth = textConfig.measureTextWidth(text);
_measuredHeight = textConfig.measureTextHeight(text);
position = position.copyWith(
size: Vector2(_measuredWidth!, _measuredHeight!),
);
}
textConfig.render(
canvas,
text,
Vector2(this.position.left, this.position.top),
);
}