DateTimeWidget constructor

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

Implementation

DateTimeWidget({
  Key? key,
  this.minDateTime,
  this.maxDateTime,
  this.initDateTime,
  this.dateFormat = datetimePickerTimeFormat,
  this.pickerTitleConfig = PickerTitleConfig.Default,
  this.onCancel,
  this.onChange,
  this.onConfirm,
  this.minuteDivider,
  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);
}