remainingTextFieldCharacterCount method

  1. @override
String remainingTextFieldCharacterCount(
  1. int remaining
)
override

The label for the TextField's character counter.

Implementation

@override
String remainingTextFieldCharacterCount(int remaining) {
  return switch (remaining) {
    0 => 'No characters remaining',
    1 => '1 character remaining',
    _ => '$remaining characters remaining',
  };
}