flutter_week_view library

Flutter Week View, created by Skyost Github : https://github.com/Skyost/FlutterWeekView

Classes

DayBar
A bar which is showing a day.
DayBarStyle
Allows to configure the day bar style.
DayView<E extends FlutterWeekViewEventMixin>
A (scrollable) day view which is able to display events, zoom and un-zoom and more !
DayViewController
Allows to control some parameters of a day view.
DayViewStyle
Allows to style a day view.
DragAndDropOptions<E extends FlutterWeekViewEventMixin>
Configures the behavior of drag-and-drop of events.
FlutterWeekViewEvent
A non-abstract flutter week view event.
FlutterWeekViewEventWidget<E extends FlutterWeekViewEventMixin>
Allows to draw a week view event.
FlutterWeekViewEventWithValue<T>
A non-abstract flutter week view event that also holds a value.
HourColumnStyle
Allows to configure the hour column style.
ResizeEventOptions<E extends FlutterWeekViewEventMixin>
Configures the behavior for resizing events. When resizing is enabled, users can drag the end of events to increase/decrease their duration.
WeekView<E extends FlutterWeekViewEventMixin>
A (scrollable) week view which is able to display events, zoom and un-zoom and more !
WeekViewController
Allows to control some parameters of a week view.
WeekViewStyle
Allows to style a week view.
ZoomableHeadersWidget<E extends FlutterWeekViewEventMixin, S extends ZoomableHeaderWidgetStyle, C extends ZoomController>
A widget which is showing both headers and can be zoomed.
ZoomableHeadersWidgetState<W extends ZoomableHeadersWidget<FlutterWeekViewEventMixin, ZoomableHeaderWidgetStyle, ZoomController>>
An abstract widget state that shows both headers and can be zoomed.
ZoomableHeaderWidgetStyle
Allows to style a zoomable header widget style.
ZoomController
An abstract zoom controller.

Enums

CurrentTimeCirclePosition
The current time circle position enum.
DragStartingGesture
Contains the drag starting gestures.

Mixins

CopyableEvent<T extends FlutterWeekViewEventMixin>
A copyable event.
FlutterWeekViewEventMixin
Represents a flutter week view event.
ShiftableEvent<T extends FlutterWeekViewEventMixin>
A shiftable event.
ZoomControllerListener
A day view controller listener.

Functions

roundTimeToFitGrid(DateTime dateTime, {Duration gridGranularity = const Duration(minutes: 30)}) DateTime
Takes a dateTime and rounds it to the closest time in an imaginary grid. The granularity of this grid is defined by gridGranularity, which defaults to 30 minutes (that is, times will be rounded to 16:00, or 16:30, or 17:00, and so on).

Typedefs

BackgroundTapCallback = dynamic Function(DateTime date)
Triggered when there's a click on the background (an empty region of the calendar). The returned value corresponds to the hour/minute where the user made the tap. For better user experience, you may want to round this value using roundTimeToFitGrid.
CurrentTimeIndicatorBuilder = Widget? Function(DayViewStyle dayViewStyle, TopOffsetCalculator topOffsetCalculator, double hourColumnWidth, bool isRtl)
Allows to build the current time indicator (rule and circle).
DateCreator = DateTime Function(int index)
Creates a date according to the specified index.
DateFormatter = String Function(int year, int month, int day)
Returns a string from a specified date.
DayBarStyleBuilder = DayBarStyle Function(DateTime date)
Builds a day bar style according to the specified date.
DayBarTapCallback = dynamic Function(DateTime date)
Triggered when the day bar has been tapped down.
DayViewStyleBuilder = DayViewStyle Function(DateTime date)
Builds a day view style according to the specified date.
EventDragCallback<E extends FlutterWeekViewEventMixin> = dynamic Function(E event, DateTime newStartTime)
Triggered when the user performs a drag-and-drop in an event. The event is the same original event, unchanged, while newStartTime contains the time corresponding to where the event was dropped. A common behavior in this callback is to shift the event's start and end dates (you may use FlutterWeekViewEvent.shiftEventTo) and then call setState to update the UI.
EventResizeCallback<E extends FlutterWeekViewEventMixin> = dynamic Function(E event, DateTime newEndTime)
Triggered when the user performs a resize in an event. The event is the same original event, unchanged, while newEndTime contains the time corresponding to where the event's end was dragged to. A common behavior in this callback is to update the event with the new end time and call setState to update the UI.
EventTextBuilder<E extends FlutterWeekViewEventMixin> = Widget Function(E event, TimeFormatter timeFormatter, TextStyle textStyle, double height, double width)
Builds an event text widget.
EventWidgetBuilder<E extends FlutterWeekViewEventMixin> = Widget Function(E event, double height, double width)
Allows to build an event widget.
HourColumnBackgroundBuilder = Decoration? Function(TimeOfDay time)
Allows to build the background decoration below single time displayed on the side border.
HourColumnTapCallback = dynamic Function(TimeOfDay time)
Triggered when the hour column has been tapped down.
HourColumnTimeBuilder = Widget? Function(HourColumnStyle dayViewStyle, TimeOfDay time)
Allows to build the time displayed on the side border.
TimeFormatter = String Function(TimeOfDay time)
Returns a string from a specified hour.
TopOffsetCalculator = double Function(TimeOfDay time)
Allows to calculate a top offset from a given hour.
VerticalDividerBuilder = VerticalDivider Function(DateTime date)
Allows to builder a vertical divider according to the specified date.