showOmniDateTimeRangePicker function

Future<List<DateTime>?> showOmniDateTimeRangePicker({
  1. required BuildContext context,
  2. DateTime? startInitialDate,
  3. DateTime? startFirstDate,
  4. DateTime? startLastDate,
  5. DateTime? endInitialDate,
  6. DateTime? endFirstDate,
  7. DateTime? endLastDate,
  8. OmniDateTimePickerType type = OmniDateTimePickerType.dateAndTime,
  9. bool? is24HourMode,
  10. bool? isShowSeconds,
  11. Color? primaryColor,
  12. Color? backgroundColor,
  13. Color? calendarTextColor,
  14. Color? tabTextColor,
  15. Color? unselectedTabBackgroundColor,
  16. Color? unselectedTabTextColor,
  17. Color? buttonTextColor,
  18. TextStyle? timeSpinnerTextStyle,
  19. TextStyle? timeSpinnerHighlightedTextStyle,
  20. Radius? borderRadius,
})

Show a dialog of the OmniDateTimeRangePicker

Returns a List

Implementation

Future<List<DateTime>?> showOmniDateTimeRangePicker({
  required BuildContext context,
  DateTime? startInitialDate,
  DateTime? startFirstDate,
  DateTime? startLastDate,
  DateTime? endInitialDate,
  DateTime? endFirstDate,
  DateTime? endLastDate,
  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,
}) {
  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 OmniDateTimeRangePicker(
        startInitialDate: startInitialDate,
        startFirstDate: startFirstDate,
        startLastDate: startLastDate,
        endInitialDate: endInitialDate,
        endFirstDate: endFirstDate,
        endLastDate: endLastDate,
        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,
      );
    },
  );
}