- 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.
- Added
onCompleted
callback toCupertinoCalendarPickerButton
andCupertinoTimePickerButton
. (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
.
- Updated the
scaleAlignment
calculation for the X-axis.
- 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 theCalendarFooterDecoration
class.
- Fixed scrolling behavior in Date/Time pickers when using a mouse on Desktop and Web platforms. (Thanks to @klondikedragon)
- Removed redundant assertions for
currentDateTime
. (Thanks to @danielshuk)
CustomCupertinoDatePicker
was updated to use the version introduced in Flutter3.27.0
a
getter was replaced byalpha
to maintain compatibility with the current minimum SDK version.
intl
package is now being used for date and time formatting.withOpacity
method was replaced bywithAlpha
due to deprecation.
use24hFormat
param has been added to all widgets. (Thanks to @sargntpi)dismissBehavior
param has been added to theCupertinoCalendarPickerButton
widget.
README
update.
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 asinline
calendar. - New
CupertinoCalendarMode
parameter withdate
anddateTime
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.
- The
-
- Weekdays are now aligned more accurately.
-
- The month/year picker mode switching animation has been updated.
Breaking Changes:
CalendarContainerDecoration
has been renamed toPickerContainerDecoration
.CalendarBackgroundType
has been renamed toPickerBackgroundType
.dismissBehaviour
has been renamed todismissBehavior
.minimumDate
has been renamed tominimumDateTime
.maximumDate
has been renamed tomaximumDateTime
.initialDate
has been renamed toinitialDateTime
.currentDate
has been renamed tocurrentDateTime
.onDateChanged
has been renamed toonDateTimeChanged
.
- The
CalendarDismissBehavior
enum was added to specify different dismiss behaviors. - The
onDateSelected
parameter was added. - The
showCupertinoCalendarPicker
function now returns aDateTime
. - Fixed an issue where the calendar closed without animation when the Android back button was tapped. (Thanks to @JCKodel)
- Fixed an issue where
safeArea
top wasn't considered in the position calculation. - Fixed an issue where
CalendarContainerDecoration
wasn't applied to the calendar.
- 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 withplainColor
andtransparentAndBlured
values.
- Default
- Other improvements:
- The
innerAlignment
of the calendar is alwaystopCenter
now. - The selected day will remain after the month/year wheel value change.
- The
cupertino_icons
dependency addedwidgetRenderBox
is required nowpubspec
screenshots update
- Decoration classes updated (copyWith, documentation)
pubspec
update
README
fixpubspec
update
- The cupertino calendar package release.