cupertino_calendar_picker 3.0.0 copy "cupertino_calendar_picker: ^3.0.0" to clipboard
cupertino_calendar_picker: ^3.0.0 copied to clipboard

This package includes a suite of Cupertino-style components that make date and time selection seamless and visually consistent with iOS design principles.

3.0.0 #

Breaking changes #

  • Migrated to the standalone cupertino_ui and material_ui packages; apps must migrate as well (see the migration guide). The flutter_localizations dependency was removed; use GlobalMaterialLocalizations.delegates from material_ui.
  • Requires Flutter 3.47.0 and Dart 3.13.0.
  • Fixed misspelled names: onOusideTapOrDateSelect, hasOusideTapDismiss and transparentAndBlured are now onOutsideTapOrDateSelect, hasOutsideTapDismiss and transparentAndBlurred.
  • Typed action callbacks: CancelCupertinoCalendarAction.onPressed is a VoidCallback and ConfirmCupertinoCalendarAction.onPressed is a ValueChanged<DateTime>. onPressed was removed from the CupertinoCalendarAction base class, and a cancel action never equals a confirm action.
  • Action labels default to the localized "Cancel" and "OK" instead of 'Cancel' and 'Done'. CupertinoCalendarAction.label is nullable; use effectiveLabel to get the displayed label.
  • widgetRenderBox of showCupertinoCalendarPicker and showCupertinoTimePicker is optional; without it the picker is centered.
  • Decoration fields are non-nullable where a default exists. The header and the selected and current day styles default to CupertinoColors.systemRed when no mainColor is given.

New #

  • Accessibility: screen reader semantics for all parts of the picker, announcement of the displayed month, and keyboard activation of buttons. (Thanks to @mikailsyr)
  • horizontalSpacing and verticalSpacing for CupertinoCalendarPickerButton and CupertinoTimePickerButton.
  • Exported CupertinoCalendarAction and CalendarButtonFormatter.
  • Value equality for decoration classes; const constructors for CupertinoCalendar and CalendarMonthPickerDecoration.
  • CalendarDismissBehavior.onActionTap asserts that at least one action is provided.

Fixes #

  • Picker result: the cancel action no longer returns the changed date and the confirm action no longer returns null. With a confirm action, closing the picker in any other way returns null. CupertinoCalendarPickerButton now displays the confirmed date.
  • Placement: the picker stays on the screen and outside of the safe area in all cases: when the screen rotates, on screens narrower than the picker, for anchors partially off the screen, in nested navigators, and with a horizontal offset. It keeps offset from its anchor and is centered on the screen when it would otherwise shrink below half of its size.
  • Date range: the initial date and time are limited to minimumDateTime...maximumDateTime in all widgets, including when the range changes; this also fixes an assertion when today is outside of the range. The AM/PM switcher, the year picker and times that are not a multiple of minuteInterval no longer produce invalid values.
  • Range changes: when a changed minimumDateTime or maximumDateTime moves the selection into the range, CupertinoCalendar, CupertinoCalendarPickerButton and CupertinoTimePickerButton report it through onDateTimeChanged/onTimeChanged, and the displayed month no longer jumps.
  • Buttons: CupertinoCalendarPickerButton and CupertinoTimePickerButton no longer fill the whole width of their parent.
  • Actions: actions of a compact CupertinoCalendar outside of an overlay no longer pop the hosting route, and the picker no longer closes a route pushed on top of it.
  • Decorations: copyWith keeps the values that were not passed, and dynamic colors adapt to dark mode in all decorations, including PickerContainerDecoration. PickerContainerDecoration.withDynamicColor now only limits the opacity of a custom color instead of raising it.
  • Localization: 12-hour times follow the locale (e.g. 下午 3:07), one-letter weekdays are no longer repeated in Chinese and Arabic, and the chevrons are mirrored in right-to-left layouts.
  • Stability fixes for disposed widgets and animations.

2.2.6 #

  • Added selectableDayPredicate callback parameter to the calendar, allowing certain dates to be disabled. (Thanks to @Menelphor)

2.2.5 #

  • Added useRootNavigator parameter to dialog functions and buttons, allowing to disable the root navigator for displaying the picker. (Thanks to @pablodekeyzer)

2.2.4 #

  • Fixed an issue with wrong weekday generation caused by daylight saving time differences. (Thanks to @vixez)

2.2.3 #

  • Fixed an issue where xAlignment was calculated incorrectly when the CupertinoCalendarPicker downscaled because of the lack of space. (Thanks to @maxfrees)
  • Added accessibility text scaling to the CupertinoCalendarPicker and CupertinoPickerButton widgets. (Thanks to @ervindobri)
  • Default fontSize for CalendarMonthPickerSelectedDay and CalendarMonthPickerSelectedCurrentDay has been decreased from 22.0 to 20.0.

2.2.2 #

  • Fixed an issue when setState was called after the CupertinoPickerButton was disposed. (Thanks to @nightmre789)

2.2.1 #

  • The intl package version constraint has been updated to the range >=0.19.0 <0.21.0. (Thanks to @KoheiKanagu)

2.2.0 #

  • Added CupertinoCalendarAction list to the CupertinoCalendar widget, allowing to display actions at the bottom of the calendar.
  • Added CalendarDismissBehavior.onActionTap allowing to dismiss the calendar only when an action is tapped.

2.1.7 #

  • Added firstDayOfWeekIndex parameter to calendar widgets, allowing customization of the starting day of the week. If not specified, the locale's default value is used.

2.1.6 #

  • Added onCompleted callback to CupertinoCalendarPickerButton and CupertinoTimePickerButton. (Thanks to @MrLightful)
  • The minimum required Flutter SDK is set to v3.24.0.
  • The minimum required Dart SDK is set to v3.2.0.

2.1.5 #

  • Updated the scaleAlignment calculation for the X-axis.

2.1.4 #

  • Thanks to @desarrolladorits2 for the following changes:
    • Fixed a bug that caused an exception during time parsing in certain localizations.
    • dayPeriodTextStyle property has been added to the CalendarFooterDecoration class.

2.1.3 #

  • Fixed scrolling behavior in Date/Time pickers when using a mouse on Desktop and Web platforms. (Thanks to @klondikedragon)

2.1.2 #

  • Removed redundant assertions for currentDateTime. (Thanks to @danielshuk)

2.1.1 #

  • CustomCupertinoDatePicker was updated to use the version introduced in Flutter 3.27.0
  • a getter was replaced by alpha to maintain compatibility with the current minimum SDK version.

2.1.0 #

  • intl package is now being used for date and time formatting.
  • withOpacity method was replaced by withAlpha due to deprecation.

2.0.1 #

  • use24hFormat param has been added to all widgets. (Thanks to @sargntpi)
  • dismissBehavior param has been added to the CupertinoCalendarPickerButton widget.

2.0.0+1 #

  • README update.

2.0.0 #

Major Updates:

  • New showCupertinoTimePicker function which can be used for time selection.
  • New CupertinoCalendarPickerButton widget.
  • New CupertinoTimePickerButton widget.
  • New CupertinoCalendar widget. Which is now can be used as inline calendar.
  • New CupertinoCalendarMode parameter with date and dateTime options, enabling the calendar to select both date and time within the picker.

Minor Updates:

  • The CupertinoCalendarPicker updates:
    • The monthDateStyle is now animated when switching between the month/year picker and month picker modes.
    • Weekdays are now aligned more accurately.
    • The month/year picker mode switching animation has been updated.

Breaking Changes:

  • CalendarContainerDecoration has been renamed to PickerContainerDecoration.
  • CalendarBackgroundType has been renamed to PickerBackgroundType.
  • dismissBehaviour has been renamed to dismissBehavior.
  • minimumDate has been renamed to minimumDateTime.
  • maximumDate has been renamed to maximumDateTime.
  • initialDate has been renamed to initialDateTime.
  • currentDate has been renamed to currentDateTime.
  • onDateChanged has been renamed to onDateTimeChanged.

1.1.2 #

  • The CalendarDismissBehavior enum was added to specify different dismiss behaviors.
  • The onDateSelected parameter was added.
  • The showCupertinoCalendarPicker function now returns a DateTime.
  • Fixed an issue where the calendar closed without animation when the Android back button was tapped. (Thanks to @JCKodel)

1.1.1 #

  • Fixed an issue where safeArea top wasn't considered in the position calculation.
  • Fixed an issue where CalendarContainerDecoration wasn't applied to the calendar.

1.1.0 #

  • Updates to the CupertinoCalendarPicker position calculation:
    • The calendar will be downscaled if it doesn't fit on a screen.
    • safeArea is now considered in the calculation.
    • verticalSpacing is now considered in the calculation.
    • Available space calculation fixes.
  • New parameters added to the showCupertinoCalendarPicker:
    • verticalSpacing to set the minimum space between the edge of the screen and the calendar.
    • barrierColor for the overlay background color.
  • Updates to the CalendarContainerDecoration class:
    • Default boxShadow has been updated.
    • CalendarBackgroundType enum added with plainColor and transparentAndBlured values.
  • Other improvements:
    • The innerAlignment of the calendar is always topCenter now.
    • The selected day will remain after the month/year wheel value change.

1.0.3 #

  • cupertino_icons dependency added
  • widgetRenderBox is required now
  • pubspec screenshots update

1.0.2 #

  • Decoration classes updated (copyWith, documentation)
  • pubspec update

1.0.1 #

  • README fix
  • pubspec update

1.0.0 #

  • The cupertino calendar package release.
145
likes
160
points
10.1k
downloads
screenshot

Documentation

API reference

Publisher

verified publisherphilip-softworks.dev

Weekly Downloads

This package includes a suite of Cupertino-style components that make date and time selection seamless and visually consistent with iOS design principles.

Repository (GitHub)
View/report issues

Topics

#cupertino #calendar-picker #ios #time-picker #widget

License

BSD-3-Clause, MIT (license)

Dependencies

cupertino_icons, cupertino_ui, flutter, intl, material_ui

More

Packages that depend on cupertino_calendar_picker