TimeRangeWidget constructor
TimeRangeWidget({
- Key? key,
- DateTime? minDateTime,
- DateTime? maxDateTime,
- bool isLimitTimeRange = true,
- DateTime? initialStartDateTime,
- DateTime? initialEndDateTime,
- String? dateFormat = datetimeRangePickerTimeFormat,
- PickerTitleConfig pickerTitleConfig = PickerTitleConfig.Default,
- int minuteDivider = 1,
- DateVoidCallback? onCancel,
- DateRangeValueCallback? onChange,
- DateRangeValueCallback? onConfirm,
- 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);
}