showOmniDateTimePicker function
Future<DateTime?>
showOmniDateTimePicker({
- required BuildContext context,
- DateTime? startInitialDate,
- DateTime? startFirstDate,
- DateTime? startLastDate,
- OmniDateTimePickerType type = OmniDateTimePickerType.dateAndTime,
- bool? is24HourMode,
- bool? isShowSeconds,
- Color? primaryColor,
- Color? backgroundColor,
- Color? calendarTextColor,
- Color? tabTextColor,
- Color? unselectedTabBackgroundColor,
- Color? unselectedTabTextColor,
- Color? buttonTextColor,
- TextStyle? timeSpinnerTextStyle,
- TextStyle? timeSpinnerHighlightedTextStyle,
- Radius? borderRadius,
- int? minutesInterval,
Show a dialog of the OmniDateTimePicker
Returns a List
Implementation
Future<DateTime?> showOmniDateTimePicker({
required BuildContext context,
DateTime? startInitialDate,
DateTime? startFirstDate,
DateTime? startLastDate,
OmniDateTimePickerType type = OmniDateTimePickerType.dateAndTime,
bool? is24HourMode,
bool? isShowSeconds,
Color? primaryColor,
Color? backgroundColor,
Color? calendarTextColor,
Color? tabTextColor,
Color? unselectedTabBackgroundColor,
Color? unselectedTabTextColor,
Color? buttonTextColor,
TextStyle? timeSpinnerTextStyle,
TextStyle? timeSpinnerHighlightedTextStyle,
Radius? borderRadius,
int? minutesInterval,
}) {
return showGeneralDialog(
context: context,
transitionBuilder: (context, anim1, anim2, child) {
return FadeTransition(
opacity: anim1.drive(
Tween(
begin: 0,
end: 1,
),
),
child: child,
);
},
transitionDuration: const Duration(milliseconds: 200),
barrierDismissible: true,
barrierLabel: '',
pageBuilder: (BuildContext context, anim1, anim2) {
return OmniDateTimePicker(
startInitialDate: startInitialDate,
startFirstDate: startFirstDate,
startLastDate: startLastDate,
type: type,
is24HourMode: is24HourMode,
isShowSeconds: isShowSeconds,
primaryColor: primaryColor,
backgroundColor: backgroundColor,
calendarTextColor: calendarTextColor,
tabTextColor: tabTextColor,
unselectedTabBackgroundColor: unselectedTabBackgroundColor,
unselectedTabTextColor: unselectedTabTextColor,
buttonTextColor: buttonTextColor,
timeSpinnerTextStyle: timeSpinnerTextStyle,
timeSpinnerHighlightedTextStyle: timeSpinnerHighlightedTextStyle,
borderRadius: borderRadius,
minutesInterval: minutesInterval,
);
},
);
}