kalender library
Classes
- CalendarBody
- The calendar body, is a generic widget that creates the relevant widget based on the ViewController.
- CalendarCallbacks
- The callbacks used by the CalendarView.
- CalendarComponents
- A styling class used by the CalendarView.
- CalendarController
- The CalendarController is used to controller a single CalendarView. It provides some useful functions for navigating the CalendarView.
- CalendarEvent
- Base class for events displayed in the calendar.
- CalendarHeader
- CalendarInteraction
- The CalendarInteraction class defines the interaction settings for the calendar.
- CalendarSnapping
- The CalendarSnapping class defines the snapping settings for the calendar.
- CalendarView
- CalendarViewState
- ContinuousScheduleViewController
- 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.
- DefaultEventsController
- The default EventsController for managing CalendarEvents.
- DefaultEventStore
- The default class for storing CalendarEvents.
- DefaultResizeHandles
- 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
- 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
- The EventsController is used to manage CalendarEvents.
- EventStore
- A class that maps CalendarEvents to dates.
- HorizontalConfiguration
- 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.
- InternalDateTime
- A DateTime subclass that stores date/time components as-is via DateTime.utc, bypassing implicit timezone conversions.
- InternalDateTimeRange
- A DateTimeRange that uses InternalDateTime for timezone-safe display and layout.
- Location
- A Location maps time instants to the zone in use at that time. Typically, the Location represents the collection of time offsets in use in a geographical area, such as CEST and CET for central Europe.
- LocationDatabase
- LocationDatabase provides interface to find Locations by their name.
- MonthBody
- This widget is used to display a month body.
- MonthBodyComponents
- The component builders used by the MonthBody.
- MonthBodyComponentStyles
- The styles of the default components used by the MonthBody.
- MonthBodyConfiguration
- MonthComponents
- 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
- The month header is a simple widget that just displays the day names.
- MonthHeaderComponents
- The component builders used by the MonthHeader.
- MonthHeaderComponentStyles
- The styles of the default components used by the MonthHeader.
- MonthViewConfiguration
- MonthViewController
- MonthWeek
- A single week in the month view.
- MultiDayBody
- This widget is used to display a multi-day body.
- MultiDayBodyComponents
- 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
- 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
- The multi-day header decides which header to display the:
- MultiDayHeaderComponents
- The component builders used by the MultiDayHeader.
- MultiDayHeaderComponentStyles
- The styles of the default components used by the MultiDayHeader.
- MultiDayHeaderConfiguration
- The configuration used by the MultiDayHeader and MonthBody.
- MultiDayLayout
- A custom layout delegate for arranging multi-day events in a calendar view.
- MultiDayLayoutFrame
- Frame containing all the data to layout the CalendarEvents with MultiDayLayout.
- MultiDayLayoutFrameCache
- A cache for MultiDayLayoutFrames.
- MultiDayOverlay
- MultiDayOverlayPortal
- A widget that manages the overlay portal for a single day.
- MultiDayOverlayStyle
- MultiDayPage
- MultiDayPortalOverlayButton
- MultiDayPortalOverlayButtonStyle
- MultiDayViewConfiguration
- The configuration used by the MultiDayBody and MultiDayHeader.
- MultiDayViewController
- OverlapLayoutDelegate
- The OverlapLayoutDelegate lays out CalendarEvent's, by stacking them on top of one another.
- OverlayBuilders
- 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
- A paginated schedule widget that displays events across multiple pages.
- PaginatedScheduleViewController
- PrototypeTimeline
- A widget that displays a prototype time line.
- ResizeHandles
- The base class for the ResizeDetectorPositioner.
- ScheduleBody
- A widget that displays events in a schedule/list format.
- ScheduleBodyConfiguration
- ScheduleComponents
-
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
- SchedulePositionList
- A scrollable list widget that displays schedule items with position tracking.
- ScheduleTileComponents
- 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
- ScrollTriggerConfiguration
- The configuration for the scroll triggers.
- SideBySideLayoutDelegate
- The SideBySideLayoutDelegate lays out CalendarEvent's next to one another.
- TapDetail
- TileComponents
- 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.
- TimeZone
- A TimeZone represents a single time zone such as CEST or CET.
- TZDateTime
- TimeZone aware DateTime.
- TzInstant
- A TzInstant represents a timezone and an instant in time.
- 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
- 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.
- InputMode
- The InputMode defines the type of input the calendar should optimize for.
- 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
- A mixin that provides useful utilities for day-based event tiles.
- DragTargetUtilities
- EventTileUtils
- MultiDayEventTileUtils
- 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.
- TimeOfDayExtension on TimeOfDay
- Utility functions for working with TimeOfDay.
Constants
-
defaultEventLayoutStrategy
→ const EventLayoutDelegate Function(Iterable<
CalendarEvent> events, InternalDateTime date, TimeOfDayRange timeOfDayRange, double heightPerMinute, double? minimumTileHeight, EventLayoutDelegateCache? cache, Location? location) - defaultFirstDayOfWeek → const int
- defaultHeightPerMinute → const double
- defaultHorizontalPadding → const EdgeInsets
- defaultInitialTimeOfDay → const TimeOfDay
- defaultNewEventDuration → const Duration
- defaultShowEventTiles → const bool
- defaultShowMultiDayEvents → const bool
- defaultTileHeight → const double
- kDefaultEmptyDayBehavior → const EmptyDayBehavior
- kDefaultMultiDayEventPadding → const EdgeInsets
- maxTime → const int
- Maximum value for time instants.
- minTime → const int
- Minimum value for time instants.
- tzDataDefaultFilename → const String
- File name of the Time Zone default database.
Properties
- local → Location
-
Local Location
no setter
- timeZoneDatabase → LocationDatabase
-
Global TimeZone database
no setter
- UTC → Location
-
UTC Location
no setter
Functions
-
defaultMultiDayFrameGenerator(
{required InternalDateTimeRange visibleDateTimeRange, required List< CalendarEvent> events, required TextDirection textDirection, required Location? location, MultiDayLayoutFrameCache? cache, int eventComparator(CalendarEvent, CalendarEvent)?}) → MultiDayLayoutFrame - The default implementation of GenerateMultiDayLayoutFrame.
-
defaultSnapStrategy(
InternalDateTime cursorDate, InternalDateTime startOfDay, int snapIntervalMinutes) → InternalDateTime -
The default snap strategy used to snap events to a the
snapIntervalMinutes. -
getLocation(
String locationName) → Location - Find Location by its name.
-
initializeDatabase(
List< int> rawData) → void - Initialize Time zone database.
-
kDefaultInitialDateSelectionStrategy(
{required ViewController oldViewController, required ViewConfiguration newViewConfiguration}) → InternalDateTime - General default strategy that routes to appropriate specific strategies
-
kDefaultRange(
) → DateTimeRange< DateTime> -
kDefaultToDaily(
{required ViewController oldViewController, required ViewConfiguration newViewConfiguration}) → InternalDateTime - Default implementation for transitioning to Daily view
-
kDefaultToMonthly(
{required ViewController oldViewController, required ViewConfiguration newViewConfiguration}) → InternalDateTime - Default implementation for transitioning to Monthly view
-
kDefaultToSchedule(
{required ViewController oldViewController, required ViewConfiguration newViewConfiguration}) → InternalDateTime - Default implementation for transitioning to Schedule view
-
kDefaultToWeekly(
{required ViewController oldViewController, required ViewConfiguration newViewConfiguration}) → InternalDateTime - Default implementation for transitioning to Weekly view
-
overlapLayoutStrategy(
Iterable< CalendarEvent> events, InternalDateTime date, TimeOfDayRange timeOfDayRange, double heightPerMinute, double? minimumTileHeight, EventLayoutDelegateCache? cache, Location? location) → EventLayoutDelegate - A EventLayoutStrategy that lays out the tiles on top of each other.
-
setLocalLocation(
Location location) → void - Set local Location
-
sideBySideLayoutStrategy(
Iterable< CalendarEvent> events, InternalDateTime date, TimeOfDayRange timeOfDayRange, double heightPerMinute, double? minimumTileHeight, EventLayoutDelegateCache? cache, Location? location) → EventLayoutDelegate - A EventLayoutStrategy that lays out the tiles side by side.
Typedefs
-
DateToEventIds
= Map<
String, Set< String> > - Maps calendar dates to sets of event IDs that occur on those dates.
- 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.
-
EventIdToEvent
= Map<
String, CalendarEvent> - Maps unique event IDs to their corresponding CalendarEvent instances.
-
EventLayoutStrategy
= EventLayoutDelegate Function(Iterable<
CalendarEvent> events, InternalDateTime date, TimeOfDayRange timeOfDayRange, double heightPerMinute, double? minimumTileHeight, EventLayoutDelegateCache? cache, Location? location) - Signature for the strategy that determines how DayEvents are laid out.
- EventSnapStrategy = InternalDateTime Function(InternalDateTime cursorDate, InternalDateTime startOfDay, int snapIntervalMinutes)
- The EventSnapStrategy typedef defines a function that snaps events to specific intervals.
- FeedbackTileBuilder = Widget Function(CalendarEvent event, Size dropTargetWidgetSize)
- The builder for the feedback tile. (When dragging)
-
GenerateMultiDayLayoutFrame
= MultiDayLayoutFrame Function({MultiDayLayoutFrameCache? cache, required List<
CalendarEvent> events, required Location? location, required TextDirection textDirection, required InternalDateTimeRange 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 = InternalDateTime Function({required ViewConfiguration newViewConfiguration, required ViewController oldViewController})
- Strategy typedef for determining the initial date when transitioning between view configurations
-
LocationDateIdMap
= Map<
String, DateToEventIds> - Maps timezone location names to their respective date-to-event-ID indexes.
- MonthDayHeaderBuilder = Widget Function(InternalDateTime 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
= Widget Function({required DateTime date, required List<
CalendarEvent> events, required RenderBoxCallback getMultiDayEventLayoutRenderBox, required RenderBoxCallback getOverlayPortalRenderBox, required MultiDayOverlayEventTileBuilder overlayTileBuilder, required OverlayPortalController portalController, required MultiDayOverlayStyle? style, required double tileHeight}) - A function that returns a MultiDayOverlay widget.
- MultiDayOverlayEventTileBuilder = MultiDayEventOverlayTile Function(CalendarEvent event, InternalDateTimeRange internalRange, VoidCallback dismissOverlay)
-
A function that returns a
MultiDayEventOverlayTilefor the multi-day overlay. -
MultiDayOverlayPortalBuilder
= Widget Function({required DateTime date, required List<
CalendarEvent> events, required RenderBoxCallback getMultiDayEventLayoutRenderBox, required int numberOfHiddenRows, required OverlayBuilders? overlayBuilders, required OverlayStyles? overlayStyles, required MultiDayOverlayEventTileBuilder 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.
- NowCallback = DateTime Function()
- A callback that returns the current DateTime representing "now" for the calendar.
- OnEventChange = void Function(CalendarEvent event)
- The callback for when an event is about to be changed.
- OnEventChanged = void Function(CalendarEvent event, CalendarEvent updatedEvent)
- The callback for when an event is changed.
- OnEventCreate = CalendarEvent? Function(CalendarEvent event)
- The call back for creating a new event.
- OnEventCreated = void Function(CalendarEvent event)
- The callback for a new event has been created.
- OnEventCreateWithDetail = CalendarEvent? Function(CalendarEvent event, TapDetail detail)
- The call back for creating a new event with details.
- OnEventTapped = void Function(CalendarEvent event, RenderBox renderBox)
- The callback for when an event is tapped.
- OnEventTappedWithDetail = void Function(CalendarEvent 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
= bool Function(DragTargetDetails<
Object?> details, CalendarController controller, HorizontalConfiguration configuration) - The callback for when a drag target is evaluating whether to accept a draggable.
-
OnWillAcceptWithDetailsVertical
= bool Function(DragTargetDetails<
Object?> details, CalendarController 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
= ResizeHandles Function(CalendarEvent event, CalendarInteraction interaction, TileComponents tileComponents, DateTimeRange<
DateTime> dateTimeRange, Size size, Axis axis, bool isImprecise) - The builder that positions the ResizeHandles.
- ScheduleDateBuilder = Widget Function(InternalDateTime date, ScheduleDateStyle? style)
- The day header builder.
-
ScheduleTileHighlightBuilder
= Widget Function(InternalDateTime date, ValueNotifier<
InternalDateTimeRange?> dateTimeRange, ScheduleTileHighlightStyle? style, Widget child) - The schedule tile highlight builder.
-
TileBuilder
= Widget Function(CalendarEvent event, DateTimeRange<
DateTime> tileRange) - The default builder for the event tiles.
- TileDropTargetBuilder = Widget Function(CalendarEvent event)
- The builder for the drop target event tile.
- TileWhenDraggingBuilder = Widget Function(CalendarEvent event)
- The builder for the event tile when dragging.
- TimeIndicatorBuilder = Widget Function(TimeOfDayRange timeOfDayRange, double heightPerMinute, TimeIndicatorStyle? style, Location? location)
- The time indicator builder.
-
TimeLineBuilder
= Widget Function(double heightPerMinute, TimeOfDayRange timeOfDayRange, TimelineStyle? style, ValueNotifier<
CalendarEvent?> eventBeingDragged, ValueNotifier<DateTimeRange< visibleDateTimeRange)DateTime> ?> - The time line builder.
- UpdatedEvent = (CalendarEvent, CalendarEvent)
- 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.