TimePickerModel constructor Null safety

TimePickerModel(
  1. {DateTime? currentTime,
  2. LocaleType? locale}
)

Implementation

TimePickerModel({DateTime? currentTime, LocaleType? locale})
    : super(locale: locale) {
  this.currentTime = currentTime ?? DateTime.now();
  _currentIndex[0] = this.currentTime.hour;
  _currentIndex[1] = this.currentTime.minute;
  _currentIndex[2] = this.currentTime.second;
}