Time12hPickerModel constructor Null safety

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

Implementation

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

  _currentLeftIndex = this.currentTime.hour % 12;
  _currentMiddleIndex = this.currentTime.minute;
  _currentRightIndex = this.currentTime.hour < 12 ? 0 : 1;
}