updateTextBox method
Updates the properties of a text box (text, font size, color).
Implementation
void updateTextBox(
TextBox textBox,
String newText,
double newFontSize,
Color newColor,
) {
textBox.text = newText;
textBox.fontSize = newFontSize;
textBox.color = newColor;
notifyListeners(); // Notify listeners about the text box update.
}