WeekView class

A (scrollable) week view which is able to display events, zoom and un-zoom and more !

Inheritance

Constructors

WeekView({Key? key, List<FlutterWeekViewEvent> events = const [], required List<DateTime> dates, DayViewStyleBuilder dayViewStyleBuilder = DefaultBuilders.defaultDayViewStyleBuilder, DayBarStyleBuilder dayBarStyleBuilder = DefaultBuilders.defaultDayBarStyleBuilder, WeekViewStyle style = const WeekViewStyle(), HoursColumnStyle hoursColumnStyle = const HoursColumnStyle(), WeekViewController? controller, bool inScrollableWidget = true, bool isRTL = false, HourMinute minimumTime = HourMinute.min, HourMinute maximumTime = HourMinute.max, DateTime? initialTime, bool userZoomable = true, CurrentTimeIndicatorBuilder? currentTimeIndicatorBuilder = DefaultBuilders.defaultCurrentTimeIndicatorBuilder, HoursColumnTimeBuilder? hoursColumnTimeBuilder = DefaultBuilders.defaultHoursColumnTimeBuilder, HoursColumnTapCallback? onHoursColumnTappedDown, DayBarTapCallback? onDayBarTappedDown, BackgroundTapCallback? onBackgroundTappedDown, DragAndDropOptions? dragAndDropOptions, ResizeEventOptions? resizeEventOptions})
Creates a new week view instance.
WeekView.builder({Key? key, List<FlutterWeekViewEvent> events = const [], int dateCount = 0, required DateCreator dateCreator, DayViewStyleBuilder dayViewStyleBuilder = DefaultBuilders.defaultDayViewStyleBuilder, DayBarStyleBuilder dayBarStyleBuilder = DefaultBuilders.defaultDayBarStyleBuilder, WeekViewStyle style = const WeekViewStyle(), HoursColumnStyle hoursColumnStyle = const HoursColumnStyle(), WeekViewController? controller, bool inScrollableWidget = true, bool isRTL = false, HourMinute minimumTime = HourMinute.min, HourMinute maximumTime = HourMinute.max, DateTime? initialTime, bool userZoomable = true, CurrentTimeIndicatorBuilder? currentTimeIndicatorBuilder = DefaultBuilders.defaultCurrentTimeIndicatorBuilder, HoursColumnTimeBuilder? hoursColumnTimeBuilder = DefaultBuilders.defaultHoursColumnTimeBuilder, HoursColumnTapCallback? onHoursColumnTappedDown, DayBarTapCallback? onDayBarTappedDown, BackgroundTapCallback? onBackgroundTappedDown, DragAndDropOptions? dragAndDropOptions, ResizeEventOptions? resizeEventOptions})
Creates a new week view instance.

Properties

controller WeekViewController
The current day view controller.
finalinherited
currentTimeIndicatorBuilder CurrentTimeIndicatorBuilder?
The current time indicator builder.
finalinherited
dateCount int
The number of dates.
final
dateCreator DateCreator
The date creator.
final
dayBarStyleBuilder DayBarStyleBuilder
The day bar style builder.
final
dayViewStyleBuilder DayViewStyleBuilder
The day view style builder.
final
dragAndDropOptions DragAndDropOptions?
Configures the behavior for drag-and-drop of events. If this is null (which is the default), drag-and-drop is disabled.
finalinherited
events List<FlutterWeekViewEvent>
The events.
final
hashCode int
The hash code for this object.
no setterinherited
hoursColumnBackgroundBuilder HoursColumnBackgroundBuilder?
Building method for building background decoration below single time displayed on the side border.
finalinherited
hoursColumnStyle HoursColumnStyle
The hours column style.
finalinherited
hoursColumnTimeBuilder HoursColumnTimeBuilder?
Building method for building the time displayed on the side border.
finalinherited
initialTime DateTime
The initial visible time. Defaults to the current hour of the day (if possible).
finalinherited
inScrollableWidget bool
Whether the widget should automatically be placed in a scrollable widget.
finalinherited
isRTL bool
Whether the widget should be aligned from right to left.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maximumTime HourMinute
The maximum time to display.
finalinherited
minimumTime HourMinute
The minimum time to display.
finalinherited
onBackgroundTappedDown BackgroundTapCallback?
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.
finalinherited
onDayBarTappedDown DayBarTapCallback?
Triggered when the day bar has been tapped down.
finalinherited
onHoursColumnTappedDown HoursColumnTapCallback?
Triggered when the hours column has been tapped down.
finalinherited
resizeEventOptions ResizeEventOptions?
Configures the behavior for resizing events. When resizing is enabled, users can drag the end of events to increase/decrease their duration. If this is null (which is the default), resizing is disabled.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style WeekViewStyle
The widget style.
finalinherited
userZoomable bool
Whether the user is able to pinch-to-zoom the widget.
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited