TimeRangeWidget constructor

TimeRangeWidget({
  1. Key? key,
  2. DateTime? minDateTime,
  3. DateTime? maxDateTime,
  4. bool isLimitTimeRange = true,
  5. DateTime? initialStartDateTime,
  6. DateTime? initialEndDateTime,
  7. String? dateFormat = datetimeRangePickerTimeFormat,
  8. PickerTitleConfig pickerTitleConfig = PickerTitleConfig.Default,
  9. int minuteDivider = 1,
  10. DateVoidCallback? onCancel,
  11. DateRangeValueCallback? onChange,
  12. DateRangeValueCallback? onConfirm,
  13. PickerConfig? themeData,
})

Implementation

TimeRangeWidget({
  Key? key,
  this.minDateTime,
  this.maxDateTime,
  this.isLimitTimeRange = true,
  this.initialStartDateTime,
  this.initialEndDateTime,
  this.dateFormat = datetimeRangePickerTimeFormat,
  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);
}