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) {
  return intl.Intl.pluralLogic(
    remaining,
    zero: remainingTextFieldCharacterCountZero,
    one: remainingTextFieldCharacterCountOne,
    two: remainingTextFieldCharacterCountTwo,
    many: remainingTextFieldCharacterCountMany,
    few: remainingTextFieldCharacterCountFew,
    other: remainingTextFieldCharacterCountOther,
    locale: _localeName,
  ).replaceFirst(r'$remainingCount', formatDecimal(remaining));
}