update method
Implementation
@override
void update(double deltaTime, BaseObject parent) {
if (parent is SceneObject && parent.isVisible) {
if (dirty) {
dirty = false;
_textPainter.text = TextSpan(
text: text,
style: _textStyle,
);
_textPainter.layout();
}
}
}