TimePickerModel constructor Null safety

TimePickerModel(
  1. {DateTime? currentTime,
  2. LocaleType? locale,
  3. bool showSecondsColumn = true}
)

Implementation

TimePickerModel(
    {DateTime? currentTime, LocaleType? locale, this.showSecondsColumn: true})
    : super(locale: locale) {
  this.currentTime = currentTime ?? DateTime.now();

  _currentLeftIndex = this.currentTime.hour;
  _currentMiddleIndex = this.currentTime.minute;
  _currentRightIndex = this.currentTime.second;
}