TimeWidget constructor

TimeWidget({
  1. Key? key,
  2. DateTime? minDateTime,
  3. DateTime? maxDateTime,
  4. DateTime? initDateTime,
  5. String? dateFormat = datetimePickerTimeFormat,
  6. PickerTitleConfig pickerTitleConfig = PickerTitleConfig.Default,
  7. int? minuteDivider = 1,
  8. DateVoidCallback? onCancel,
  9. DateValueCallback? onChange,
  10. DateValueCallback? onConfirm,
  11. PickerConfig? themeData,
})

Implementation

TimeWidget({
  Key? key,
  this.minDateTime,
  this.maxDateTime,
  this.initDateTime,
  this.dateFormat = datetimePickerTimeFormat,
  this.pickerTitleConfig = PickerTitleConfig.Default,
  this.minuteDivider = 1,
  this.onCancel,
  this.onChange,
  this.onConfirm,
  this.themeData,
}) : super(key: key) {
  DateTime minTime = minDateTime ?? DateTime.parse(datePickerMinDatetime);
  DateTime maxTime = maxDateTime ?? DateTime.parse(datePickerMaxDatetime);
  assert(minTime.compareTo(maxTime) < 0);
  themeData ??= PickerConfig();
  themeData = BaseThemeConfig.instance
      .getConfig(configId: themeData!.configId)
      .pickerConfig
      .merge(themeData);
}