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
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
Configures the behavior of drag-and-drop of events.
FlutterWeekViewEvent
Represents a flutter week view event.
HourMinute
Simply represents a hour and a minute. This is not a duration but more of an instant in the current day.
HoursColumnStyle
Allows to configure the hours column style.
ResizeEventOptions
Configures the behavior for resizing events. When resizing is enabled, users can drag the end of events to increase/decrease their duration.
WeekView
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<S extends ZoomableHeaderWidgetStyle, C extends ZoomController>
A widget which is showing both headers and can be zoomed.
ZoomableHeadersWidgetState<W extends ZoomableHeadersWidget<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

Mixins

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 hoursColumnWidth, 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 = dynamic Function(FlutterWeekViewEvent 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 = dynamic Function(FlutterWeekViewEvent 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 = Widget Function(FlutterWeekViewEvent event, BuildContext context, DayView dayView, double height, double width)
Builds an event text widget.
HoursColumnBackgroundBuilder = Decoration? Function(HourMinute time)
Allows to build the background decoration below single time displayed on the side border.
HoursColumnTapCallback = dynamic Function(HourMinute time)
Triggered when the hours column has been tapped down.
HoursColumnTimeBuilder = Widget? Function(HoursColumnStyle dayViewStyle, HourMinute time)
Allows to build the time displayed on the side border.
TimeFormatter = String Function(HourMinute time)
Returns a string from a specified hour.
TopOffsetCalculator = double Function(HourMinute 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.