kalender library

Classes

CalendarBody<T extends Object?>
The calendar body, is a generic widget that creates the relevant widget based on the ViewController.
CalendarCallbacks<T extends Object?>
The callbacks used by the CalendarView.
CalendarComponents<T extends Object?>
A styling class used by the CalendarView.
CalendarController<T extends Object?>
The CalendarController is used to controller a single CalendarView. It provides some useful functions for navigating the CalendarView.
CalendarEvent<T extends Object?>
TODO: consider a abstract class for CalendarEvent that needs to be implemented by users.
CalendarHeader<T extends Object?>
CalendarInteraction
The CalendarInteraction class defines the interaction settings for the calendar.
CalendarSnapping
The CalendarSnapping class defines the snapping settings for the calendar.
CalendarView<T extends Object?>
CalendarViewState<T>
ContinuousScheduleViewController<T extends Object?>
DateMap<T>
A class that maps CalendarEvents to dates.
DayDetail
The detail for when the calendar is tapped.
DayHeader
A widget that displays the name of the day and the day number of the week.
DayHeaderStyle
The styling class for the DayHeader.
DaySeparator
A widget that displays a separator between days.
DaySeparatorStyle
The style for the DaySeparator widget.
DefaultDateMap<T>
The default class for storing CalendarEvents.
DefaultEventsController<T extends Object?>
The default EventsController for managing CalendarEvents.
DefaultResizeHandles<T extends Object?>
The base class for the ResizeDetectorPositioner.
EventInteraction
The EventInteraction class defines the interaction settings for individual calendar events.
EventLayoutData
This stores the final layout data of a single CalendarEvent.
EventLayoutDelegate<T extends Object?>
The base MultiChildLayoutDelegate class for laying out CalendarEvents.
EventLayoutDelegateCache
A cache for EventLayoutDelegates.
EventLayoutInformation
Contains all the data needed to layout a single event with the MultiDayLayout.
EventsController<T extends Object?>
The EventsController is used to manage CalendarEvents.
HorizontalConfiguration<T extends Object?>
The base class for all horizontal views of the calendar.
HorizontalGroupData
This stores horizontal data top and bottom for a group of VerticalLayoutData.
HourLines
A widget that displays lines for each hour based on the timeOfDayRange and heightPerMinute.
HourLinesStyle
The style of the HourLines widget.
MonthBody<T extends Object?>
This widget is used to display a month body.
MonthBodyComponents<T extends Object?>
The component builders used by the MonthBody.
MonthBodyComponentStyles
The styles of the default components used by the MonthBody.
MonthBodyConfiguration<T extends Object?>
MonthComponents<T extends Object?>
A class containing custom widget builders for the MonthBody and MonthHeader.
MonthComponentStyles
A class containing styles for the MonthBody and MonthHeader.
MonthDayHeader
A widget that displays the day number.
MonthDayHeaderStyle
The style of the MonthDayHeader.
MonthGrid
A widget that displays the month grid.
MonthGridStyle
The MonthGridStyle class is used by the MonthGrid widget.
MonthHeader<T extends Object?>
The month header is a simple widget that just displays the day names.
MonthHeaderComponents<T extends Object?>
The component builders used by the MonthHeader.
MonthHeaderComponentStyles
The styles of the default components used by the MonthHeader.
MonthViewConfiguration
MonthViewController<T extends Object?>
MonthWeek<T extends Object?>
A single week in the month view.
MultiDayBody<T extends Object?>
This widget is used to display a multi-day body.
MultiDayBodyComponents<T>
The component builders used by the MultiDayBody.
MultiDayBodyComponentStyles
The styles of the default components used by the MultiDayBody.
MultiDayBodyConfiguration
The configuration used by the MultiDayBody.
MultiDayComponents<T extends Object?>
A class containing custom widget builders for the MultiDayBody and MultiDayHeader.
MultiDayComponentStyles
A class containing styles for the MultiDayBody and MultiDayHeader.
MultiDayDetail
The detail for when a multi-day range is tapped.
MultiDayHeader<T extends Object?>
The multi-day header decides which header to display the:
MultiDayHeaderComponents<T>
The component builders used by the MultiDayHeader.
MultiDayHeaderComponentStyles
The styles of the default components used by the MultiDayHeader.
MultiDayHeaderConfiguration<T extends Object?>
The configuration used by the MultiDayHeader and MonthBody.
MultiDayLayout
A custom layout delegate for arranging multi-day events in a calendar view.
MultiDayLayoutFrame<T>
Frame containing all the data to layout the CalendarEvents with MultiDayLayout.
MultiDayLayoutFrameCache<T extends Object?>
A cache for MultiDayLayoutFrames.
MultiDayOverlay<T extends Object?>
MultiDayOverlayPortal<T extends Object?>
A widget that manages the overlay portal for a single day.
MultiDayOverlayStyle
MultiDayPage<T extends Object?>
MultiDayPortalOverlayButton
MultiDayPortalOverlayButtonStyle
MultiDayViewConfiguration
The configuration used by the MultiDayBody and MultiDayHeader.
MultiDayViewController<T extends Object?>
OverlapLayoutDelegate<T extends Object?>
The OverlapLayoutDelegate lays out CalendarEvent's, by stacking them on top of one another.
OverlayBuilders<T extends Object?>
Builders used to create the overlayPortal, overlay and overlay button widgets.
OverlayStyles
Styles used by the overlay widgets.
PageTriggerConfiguration
The configuration for the page triggers.
PaginatedSchedule<T extends Object?>
A paginated schedule widget that displays events across multiple pages.
PaginatedScheduleViewController<T extends Object?>
PrototypeTimeline
A widget that displays a prototype time line.
ResizeHandles<T extends Object?>
The base class for the ResizeDetectorPositioner.
ScheduleBody<T extends Object?>
A widget that displays events in a schedule/list format.
ScheduleBodyConfiguration
ScheduleComponents<T extends Object?>
A class containing custom widget builders for the ScheduleBody`.
ScheduleComponentStyles
ScheduleDate
A widget that displays the name of the day and the day number of the week.
ScheduleDateStyle
The style of the ScheduleDate.
ScheduleHeader<T extends Object?>
SchedulePositionList<T extends Object?>
A scrollable list widget that displays schedule items with position tracking.
ScheduleTileComponents<T extends Object?>
The components used by the ScheduleBody to render the event tiles.
ScheduleTileHighlight
A widget that highlights the list item if the date is within the given dateTimeRange.
ScheduleTileHighlightStyle
ScheduleViewConfiguration
ScheduleViewController<T extends Object?>
ScrollTriggerConfiguration
The configuration for the scroll triggers.
SideBySideLayoutDelegate<T extends Object?>
The SideBySideLayoutDelegate lays out CalendarEvent's next to one another.
TapDetail
TileComponents<T extends Object?>
The components used by the MultiDayBody/MonthBody to render the event tiles.
TimeIndicator
A widget that displays the current time as a line and a circle.
TimeIndicatorStyle
The style of the TimeIndicator widget.
TimeLine
A widget that displays a list of times based on the timeOfDayRange and heightPerMinute.
TimelineStyle
The style of the TimeLine widget.
TimeOfDayRange
Encapsulates a start and end TimeOfDay that represents a day time range.
VerticalConfiguration
The base class for all vertical views of the calendar.
VerticalLayoutData
This stores the vertical layout data of a single CalendarEvent.
ViewConfiguration
The base class for all ViewConfigurations.
ViewController<T extends Object?>
A controller for calendar views.
WeekDayHeader
A widget that displays the name of the day of the week.
WeekDayHeaderStyle
The WeekDayHeaderStyle class is used by the default WeekDayHeader widget.
WeekNumber
A widget that displays the week number.
WeekNumberStyle
The style of the WeekNumber.

Enums

CreateEventGesture
The CreateEventGesture is used to differentiate between the different ways to create an event.
EmptyDayBehavior
The default behavior for empty days in the schedule view.
MultiDayViewType
ResizeDirection
The ResizeDirection is used to differentiate between the different directions that an event can be resized in.
ScheduleViewType
The type of the schedule view.

Mixins

DayEventTileUtils<T extends Object?>
A mixin that provides useful utilities for day-based event tiles.
DragTargetUtilities<T>
MultiDayEventTileUtils<T extends Object?>
A mixin that provides useful utilities for multi-day event tiles.
TimeLineUtils
A mixin that provides utility methods for the TimeLine and HourLines widget.

Extensions

DateTimeExtensions on DateTime
Useful extensions for working with DateTime objects.
DateTimeRangeExtensions on DateTimeRange<DateTime>
An extension on the DateTimeRange class that provides helpful methods.
TimeOfDayExtension on TimeOfDay
Utility functions for working with TimeOfDay.

Constants

defaultEventLayoutStrategy → const EventLayoutDelegate<Object?> Function<T extends Object?>(Iterable<CalendarEvent<T>> events, DateTime date, TimeOfDayRange timeOfDayRange, double heightPerMinute, double? minimumTileHeight, EventLayoutDelegateCache? cache)
defaultFirstDayOfWeek → const int
defaultHeightPerMinute → const double
defaultHorizontalPadding → const EdgeInsets
defaultInitialTimeOfDay → const TimeOfDay
defaultMultiDayEventLayoutStrategy → const MultiDayEventLayoutDelegate<Object?> Function<T extends Object?>(List<CalendarEvent<T>> events, DateTimeRange<DateTime> dateTimeRange, double multiDayTileHeight, TextDirection textDirection)
defaultNewEventDuration → const Duration
defaultShowEventTiles → const bool
defaultShowMultiDayEvents → const bool
defaultTileHeight → const double
kDefaultEmptyDayBehavior → const EmptyDayBehavior
kDefaultMultiDayEventPadding → const EdgeInsets

Functions

defaultMultiDayFrameGenerator<T extends Object?>({required DateTimeRange<DateTime> visibleDateTimeRange, required List<CalendarEvent<T>> events, required TextDirection textDirection, MultiDayLayoutFrameCache<T>? cache, int eventComparator(CalendarEvent<T>, CalendarEvent<T>)?}) MultiDayLayoutFrame<T>
The default implementation of GenerateMultiDayLayoutFrame.
defaultSnapStrategy(DateTime cursorDate, DateTime startOfDay, int snapIntervalMinutes) DateTime
The default snap strategy used to snap events to a the snapIntervalMinutes.
kDefaultInitialDateSelectionStrategy({required ViewController<Object?> oldViewController, required ViewConfiguration newViewConfiguration}) DateTime
General default strategy that routes to appropriate specific strategies
kDefaultToDaily({required ViewController<Object?> oldViewController, required ViewConfiguration newViewConfiguration}) DateTime
Default implementation for transitioning to Daily view
kDefaultToMonthly({required ViewController<Object?> oldViewController, required ViewConfiguration newViewConfiguration}) DateTime
Default implementation for transitioning to Monthly view
kDefaultToSchedule({required ViewController<Object?> oldViewController, required ViewConfiguration newViewConfiguration}) DateTime
Default implementation for transitioning to Schedule view
kDefaultToWeekly({required ViewController<Object?> oldViewController, required ViewConfiguration newViewConfiguration}) DateTime
Default implementation for transitioning to Weekly view
overlapLayoutStrategy<T extends Object?>(Iterable<CalendarEvent<T>> events, DateTime date, TimeOfDayRange timeOfDayRange, double heightPerMinute, double? minimumTileHeight, EventLayoutDelegateCache? cache) EventLayoutDelegate<Object?>
A EventLayoutStrategy that lays out the tiles on top of each other.
sideBySideLayoutStrategy<T extends Object?>(Iterable<CalendarEvent<T>> events, DateTime date, TimeOfDayRange timeOfDayRange, double heightPerMinute, double? minimumTileHeight, EventLayoutDelegateCache? cache) EventLayoutDelegate<Object?>
A EventLayoutStrategy that lays out the tiles side by side.

Typedefs

DayHeaderBuilder = Widget Function(DateTime date, DayHeaderStyle? style)
The day header builder.
DaySeparatorBuilder = Widget Function(DaySeparatorStyle? style)
The day separator builder.
EmptyItemBuilder = Widget Function(DateTimeRange<DateTime> tileRange)
The builder for the empty item.
EventLayoutStrategy<T extends Object?> = EventLayoutDelegate<T> Function(Iterable<CalendarEvent<T>> events, DateTime date, TimeOfDayRange timeOfDayRange, double heightPerMinute, double? minimumTileHeight, EventLayoutDelegateCache? cache)
Signature for the strategy that determines how DayEvents are laid out.
EventSnapStrategy = DateTime Function(DateTime cursorDate, DateTime startOfDay, int snapIntervalMinutes)
The EventSnapStrategy typedef defines a function that snaps events to specific intervals.
FeedbackTileBuilder<T extends Object?> = Widget Function(CalendarEvent<T> event, Size dropTargetWidgetSize)
The builder for the feedback tile. (When dragging)
GenerateMultiDayLayoutFrame<T extends Object?> = MultiDayLayoutFrame<T> Function({MultiDayLayoutFrameCache<T>? cache, required List<CalendarEvent<T>> events, required TextDirection textDirection, required DateTimeRange<DateTime> visibleDateTimeRange})
A function type that generates a layout frame for multi-day events.
HorizontalTriggerWidgetBuilder = Widget Function(double pageWidth)
The trigger widget builder, should be constrained in width.
HourLinesBuilder = Widget Function(double heightPerMinute, TimeOfDayRange timeOfDayRange, HourLinesStyle? style, TimelineStyle? timelineStyle)
The hour lines builder.
InitialDateSelectionStrategy = DateTime Function({required ViewConfiguration newViewConfiguration, required ViewController<Object?> oldViewController})
Strategy typedef for determining the initial date when transitioning between view configurations
MonthDayHeaderBuilder = Widget Function(DateTime date, MonthDayHeaderStyle? style)
The month day header builder.
MonthGridBuilder = Widget Function(MonthGridStyle? style, int numberOfRows)
The month grid builder.
MonthItemBuilder = Widget Function(DateTimeRange<DateTime> monthRange)
The builder for the month item.
MultiDayOverlayBuilder<T extends Object?> = Widget Function({required DateTime date, required List<CalendarEvent<T>> events, required RenderBoxCallback getMultiDayEventLayoutRenderBox, required RenderBoxCallback getOverlayPortalRenderBox, required MultiDayOverlayEventTileBuilder<T> overlayTileBuilder, required OverlayPortalController portalController, required MultiDayOverlayStyle? style, required double tileHeight})
A function that returns a MultiDayOverlay widget.
MultiDayOverlayEventTileBuilder<T> = MultiDayOverlayEventTile<T> Function(CalendarEvent<T> event, DateTimeRange<DateTime> dateTimeRange, VoidCallback dismissOverlay)
A function that returns a MultiDayOverlayEventTile for the multi-day overlay.
MultiDayOverlayPortalBuilder<T extends Object?> = Widget Function({required DateTime date, required List<CalendarEvent<T>> events, required RenderBoxCallback getMultiDayEventLayoutRenderBox, required int numberOfHiddenRows, required OverlayBuilders<T>? overlayBuilders, required OverlayStyles? overlayStyles, required MultiDayOverlayEventTileBuilder<T> overlayTileBuilder, required double tileHeight})
A function that returns a MultiDayOverlayPortal.
MultiDayPortalOverlayButtonBuilder = Widget Function(OverlayPortalController portalController, int numberOfHiddenRows, MultiDayPortalOverlayButtonStyle? style)
The builder used to create the button for the MultiDayPortalOverlayButton.
OnEventChange<T extends Object?> = void Function(CalendarEvent<T> event)
The callback for when an event is about to be changed.
OnEventChanged<T extends Object?> = void Function(CalendarEvent<T> event, CalendarEvent<T> updatedEvent)
The callback for when an event is changed.
OnEventCreate<T extends Object?> = CalendarEvent<T>? Function(CalendarEvent<T> event)
The call back for creating a new event.
OnEventCreated<T extends Object?> = void Function(CalendarEvent<T> event)
The callback for a new event has been created.
OnEventCreateWithDetail<T extends Object?> = CalendarEvent<T>? Function(CalendarEvent<T> event, TapDetail detail)
The call back for creating a new event with details.
OnEventTapped<T extends Object?> = void Function(CalendarEvent<T> event, RenderBox renderBox)
The callback for when an event is tapped.
OnEventTappedWithDetail<T extends Object?> = void Function(CalendarEvent<T> event, RenderBox renderBox, TapDetail detail)
The callback for when an event is tapped.
OnLongPressed = void Function(DateTime date)
The callback for when a user long presses on an empty space in the calendar.
OnLongPressedWithDetails = void Function(TapDetail details)
The callback for when a user long presses on an empty space in the calendar with details.
OnMultiDayTapped = void Function(DateTimeRange<DateTime> dateRange)
TODO: Remove in 1.0.0 as it is deprecated. The callback for when a user taps on an empty space in a multi-day calendar.
OnPageChanged = void Function(DateTimeRange<DateTime> dateTimeRange)
The callback for when a calendar page is changed.
OnTapped = void Function(DateTime date)
The callback for when a user taps on an empty space in the calendar.
OnTappedWithDetails = void Function(TapDetail details)
The callback for when a user taps on an empty space in the calendar with details.
OnWillAcceptWithDetailsHorizontal<T extends Object?> = bool Function(DragTargetDetails<Object?> details, CalendarController<T> controller, HorizontalConfiguration<T> configuration)
The callback for when a drag target is evaluating whether to accept a draggable.
OnWillAcceptWithDetailsVertical<T extends Object?> = bool Function(DragTargetDetails<Object?> details, CalendarController<T> controller, VerticalConfiguration configuration)
The callback for when a drag target is evaluating whether to accept a draggable.
PrototypeTimeLineBuilder = Widget Function(double heightPerMinute, TimeOfDayRange timeOfDayRange, TimelineStyle? style)
The prototype time line builder.
RenderBoxCallback = RenderBox Function()
A function that returns a RenderBox for the multi-day event layout.
ResizeHandlePositioner<T extends Object?> = ResizeHandles<T> Function(CalendarEvent<T> event, CalendarInteraction interaction, TileComponents<T> tileComponents, DateTimeRange<DateTime> dateTimeRange, Size size, Axis axis)
The builder that positions the ResizeHandles.
ScheduleDateBuilder = Widget Function(DateTime date, ScheduleDateStyle? style)
The day header builder.
ScheduleTileHighlightBuilder = Widget Function(DateTime date, ValueNotifier<DateTimeRange<DateTime>?> dateTimeRange, ScheduleTileHighlightStyle? style, Widget child)
The schedule tile highlight builder.
TileBuilder<T extends Object?> = Widget Function(CalendarEvent<T> event, DateTimeRange<DateTime> tileRange)
The default builder for the event tiles.
TileDropTargetBuilder<T extends Object?> = Widget Function(CalendarEvent<T> event)
The builder for the drop target event tile.
TileWhenDraggingBuilder<T extends Object?> = Widget Function(CalendarEvent<T> event)
The builder for the event tile when dragging.
TimeIndicatorBuilder = Widget Function(TimeOfDayRange timeOfDayRange, double heightPerMinute, double timelineWidth, TimeIndicatorStyle? style)
The time indicator builder.
TimeLineBuilder = Widget Function(double heightPerMinute, TimeOfDayRange timeOfDayRange, TimelineStyle? style, ValueNotifier<CalendarEvent<Object?>?> eventBeingDragged, ValueNotifier<DateTimeRange<DateTime>> visibleDateTimeRange)
The time line builder.
UpdatedEvent<T> = (CalendarEvent<T>, CalendarEvent<T>)
VerticalTriggerWidgetBuilder = Widget Function(double viewPortHeight)
The trigger widget builder, should be constrained in height.
WeekDayHeaderBuilder = Widget Function(DateTime date, WeekDayHeaderStyle? style)
The week day header builder.
WeekNumberBuilder = Widget Function(DateTimeRange<DateTime> visibleDateTimeRange, WeekNumberStyle? style)
The week number builder.