DateRangeWidget constructor
DateRangeWidget({
- Key? key,
- DateTime? minDateTime,
- DateTime? maxDateTime,
- DateTime? initialStartDateTime,
- DateTime? initialEndDateTime,
- String? dateFormat = datetimeRangePickerDateFormat,
- PickerTitleConfig pickerTitleConfig = PickerTitleConfig.Default,
- DateVoidCallback? onCancel,
- DateRangeValueCallback? onChange,
- DateRangeValueCallback? onConfirm,
- 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);
}