as_calendar library

Classes

CalendarEventModel
CrCalendar
Stateful calendar widget.
CrCalendarController
Controller for CrCalendar.
CrDatePickerDialog
Customizable date picker dialog that uses CrCalendar in date pick mode.
DatePickerProperties
Properties holder for date picker.
DayItem
Represent calendar day body
DayItemProperties
Class with properties for building custom day item widget.
EventProperties
Event widget properties used in EventBuilder.
EventsLineDrawer
WeekDrawer
YearPickerWidget
Year picker widget.

Enums

LandscapeDaysResizeMode
adaptive - days cells will change their height according to parent height.
TouchMode
Touch modes of CrCalendar.
WeekDay
Week days representation.

Functions

mapWeekDayAndRowToDate(Jiffy beginRange, int dayOfWeek, int row) → Jiffy
Returns date for dayOfWeek and for row in which it take place
showCrDatePicker(BuildContext context, {required DatePickerProperties properties}) Future
Show customised date picker dialog.
sortWeekdays(WeekDay fistDayInWeek) List<WeekDay>
Sort days enum based on first day in week passed to CrCalendar.

Typedefs

DateTitleBuilder = Widget Function(DateTime date)
Builder for CrDatePickerDialog title over calendar widget and in control bar.
DayItemBuilder = Widget Function(DayItemProperties properties)
Builder for customization of days cells.
EventBuilder = Widget Function(EventProperties eventDrawer)
Builder for customization of events. Events look like lines over calendar days.
LocalizedWeekDaysBuilder = Widget Function(String weekDay)
Builder for week day customization at the top of the calendar widget. The weekdays first letter in uppercase is passed as a String, eg. M (Monday), T (Tuesday) etc.
OnDateRangeSelected = void Function(DateTime? rangeBegin, DateTime? rangeEnd)
Callback for getting date range data from CrDatePickerDialog.
OnDateSelectCallback = dynamic Function(DateTime selectedDate)
OnRangeSelectedCallback = dynamic Function(List<CalendarEventModel> events, DateTime? begin, DateTime? end)
On date range selected callback
OnSwipeCallback = dynamic Function(int year, int month)
On calendar scroll callback. Fires every time when user swipes calendar.
OnTapCallback = dynamic Function(List<CalendarEventModel> events, DateTime day)
On calendar's day tap callback.
PickerButtonBuilder = Widget? Function(Function? onPress)
Builder for buttons used in CrDatePickerDialog. Call onPress function in onPressed of your button.
WeekDaysBuilder = Widget Function(WeekDay day)
Builder for customization week days row at top of the calendar widget.
YearPickerItemBuilder = Widget Function(int year, bool isSelected)
Builder for YearPickerWidget item.