remainingTextFieldCharacterCount method Null safety

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

The label for the TextField's character counter.

Implementation

@override
String remainingTextFieldCharacterCount(int remaining) {
  switch (remaining) {
    case 0:
      return 'No characters remaining';
    case 1:
      return '1 character remaining';
    default:
      return '$remaining characters remaining';
  }
}