DateRangeWidget constructor

DateRangeWidget({
  1. Key? key,
  2. DateTime? minDateTime,
  3. DateTime? maxDateTime,
  4. DateTime? initialStartDateTime,
  5. DateTime? initialEndDateTime,
  6. String? dateFormat = datetimeRangePickerDateFormat,
  7. PickerTitleConfig pickerTitleConfig = PickerTitleConfig.Default,
  8. DateVoidCallback? onCancel,
  9. DateRangeValueCallback? onChange,
  10. DateRangeValueCallback? onConfirm,
  11. PickerConfig? themeData,
})

Implementation

DateRangeWidget({
  Key? key,
  this.minDateTime,
  this.maxDateTime,
  this.initialStartDateTime,
  this.initialEndDateTime,
  this.dateFormat = datetimeRangePickerDateFormat,
  this.pickerTitleConfig = PickerTitleConfig.Default,
  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);
}