updateTextBox method

void updateTextBox(
  1. TextBox textBox,
  2. String newText,
  3. double newFontSize,
  4. Color newColor,
)

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.
}