antd_calendar 1.0.1
antd_calendar: ^1.0.1 copied to clipboard
Ant Design calendar and calendar picker for Flutter, sharing one core with platform-specific desktop (antd v6) and mobile (antd-mobile v5) renderers.
Changelog #
1.0.1 #
- Fix pub.dev static analysis results by aligning internal dependency constraints.
- Ship the package example and tighten pubspec metadata for better pub.dev scoring.
- Documentation and changelog polish.
1.0.0 #
Initial stable release of the standalone antd_calendar package.
Architecture #
- Split the calendar into a widget-free core plus two renderers:
calendar_core(config snapshot,AntCalendarCoreStateChangeNotifier, grid math, locale) withdesktop/(antd v6) andmobile/(antd-mobile v5) implementations. - Added platform dispatch through
layout(auto/fullscreen/card) andplatform(auto/desktop/mobile), resolvingautoviaAntResponsivewith a desktop fallback when no responsive scope exists. - Dependency direction is one-way:
antd_calendar->antd_flutter_ui->antd_theme; no dependency on other standalone component packages.
Features #
AntCalendarmonth grid with single, range and multi selection,eventLoaderdots,validRange/min/maxbounds,minPage/maxPagenavigation clamping, anddisabledDate/shouldDisableDatealiases.- Panel format switching:
month,twoWeeks,weekviacalendarFormat,showFormatSwitcher,onFormatChanged. - Desktop cells in three layers:
dateCell,cellRenderwithAntCalendarCellRenderInfo, andfullCellRender; year panel viamonthCellRender/monthFullCellRender;headerRenderfor a fully custom header; optionalshowWeekweek-number column; year/month dropdowns withenableYearMonthDropdown. - Mobile layering:
renderDateandrenderLabel,mobileCellRender, four navigation arrows, optionalshowYearNavButtons, swipe-to-paginate. AntCalendarControllerwithpreviousMonth,nextMonth,goToYearMonth,jumpToToday; throwsStateErrorbefore attach and detaches on dispose.AntCalendarPicker(bottom sheet) andAntCalendarPickerView(embedded) with single/range modes,min/maxmonth clamping,allowClear,onConfirm/onCancel/onChange,visible/onClose/onMaskClick,showCloseButton,closeOnMaskClick.AntCalendarLocalewith 15 built-in presets (zh,zhTw,en,ja,ko,fr,de,es,ru,pt,it,ar,th,vi,id),AntCalendarLocale.fromLanguageCodefallback, andAntCalendarLocaleProviderglobal injection.
Breaking changes #
weekStartsOnnow defaults to Sunday on both renderers. Monday-first layouts must passAntCalendarWeekStartsOn.mondayexplicitly.selectionModeis now nullable:nullrenders a display-only calendar whose days are not tappable. The default remainsAntCalendarSelectionMode.single.- Range selection is controlled through
rangeValue/defaultRangeValueplusonRangeChangeinstead of a plain value list. Both lists must contain exactly two dates, and the desktop renderer asserts when they are supplied - range control is a mobile-renderer capability. dateCellRenderanddateFullCellRenderare deprecated in favor ofcellRenderandfullCellRender; they remain as compatibility aliases.allowCleardefaults differ by renderer:trueon mobile,falseon desktop.