clearText method

void clearText()

Clears all characters from the active text field.

Implementation

void clearText() {
  final field = _focusedField;
  if (field == null) return;
  final controller = controllers[field];
  if (controller == null) return;
  controller.clear();
  notifyListeners();
}