CrCalendar class

Stateful calendar widget.

Each month is represented by one page in PageView.

Inheritance

Constructors

CrCalendar({required CrCalendarController controller, required DateTime initialDate, WeekDaysBuilder? weekDaysBuilder, OnTapCallback? onDayClicked, WeekDay firstDayOfWeek = WeekDay.sunday, DayItemBuilder? dayItemBuilder, bool forceSixWeek = false, int maxEventLines = 4, Color? backgroundColor, EventBuilder? eventBuilder, TouchMode touchMode = TouchMode.singleTap, double eventsTopPadding = 12.0, OnRangeSelectedCallback? onRangeSelected, int onSwipeCallbackDebounceMs = 100, DateTime? minDate, DateTime? maxDate, Key? key})
Default constructor.

Properties

backgroundColor Color?
Background color of calendar.
final
controller CrCalendarController
Calendar controller.
final
dayItemBuilder DayItemBuilder?
See DayItemBuilder.
final
eventBuilder EventBuilder?
See EventBuilder.
final
eventsTopPadding double
Padding over events widgets to for correction of their alignment.
final
firstDayOfWeek WeekDay
Start day of the week. Default is WeekDay.sunday.
final
forceSixWeek bool
Force calendar to display sixth row in month view even if this week is not in current month.
final
hashCode int
The hash code for this object.
no setterinherited
initialDate DateTime
Initial date to be opened when calendar is created.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxDate DateTime?
The maximum date until which the calendar can scroll
final
maxEventLines int
Number of events widgets to be displayed over day item cell.
final
minDate DateTime?
The minimum date until which the calendar can scroll
final
onDayClicked OnTapCallback?
Callback fired when calendar day is tapped in calendar with TouchMode.singleTap touch mode.
final
onRangeSelected OnRangeSelectedCallback?
Callback for receiving selected range when calendar is used as date picker.
final
onSwipeCallbackDebounceMs int
Time in milliseconds for debounce CrCalendarController onSwipe callback.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
touchMode TouchMode
Touch mode of calendar.
final
weekDaysBuilder WeekDaysBuilder?
See WeekDaysBuilder.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _CrCalendarState
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