timerPickerSecondLabel method Null safety

  1. @override
String? timerPickerSecondLabel(
  1. int second
)
override

Label that appears next to the minute picker in CupertinoTimerPicker when selected minute value is second. This function will deal with pluralization based on the second parameter.

Implementation

@override
String? timerPickerSecondLabel(int second) {
  return intl.Intl.pluralLogic(
    second,
    zero: timerPickerSecondLabelZero,
    one: timerPickerSecondLabelOne,
    two: timerPickerSecondLabelTwo,
    few: timerPickerSecondLabelFew,
    many: timerPickerSecondLabelMany,
    other: timerPickerSecondLabelOther,
    locale: _localeName,
  )?.replaceFirst(r'$second', _decimalFormat.format(second));
}