EventCalendar class
A calendar widget that displays events for each day of the week.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- EventCalendar
Constructors
-
EventCalendar({Key? key, required DateTime currentMonth, required DateTime selectedDate, required List<
CalendarEvent> events, required ValueChanged<DateTime> onDateSelected, required VoidCallback onNextMonth, required VoidCallback onPreviousMonth, EventCalendarStyle style = const EventCalendarStyle(), int startHour = 7, int endHour = 19, Widget eventBuilder(BuildContext, CalendarEvent)?, Widget timeSlotBuilder(BuildContext, DateTime)?}) -
Creates a calendar widget that displays events for each day of the week.
const
Properties
- currentMonth → DateTime
-
The currently displayed month in the calendar.
final
- endHour → int
-
The hour at which the calendar starts displaying time slots.
final
- eventBuilder → Widget Function(BuildContext, CalendarEvent)?
-
Builder for events, allowing customization of how each event is displayed.
final
-
events
→ List<
CalendarEvent> -
List of events to display in the calendar.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onDateSelected
→ ValueChanged<
DateTime> -
Callback when the user selects a date.
final
- onNextMonth → VoidCallback
-
Callback when the user selects a date.
final
- onPreviousMonth → VoidCallback
-
Callback when the user navigates to the next month.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedDate → DateTime
-
The currently selected date in the calendar.
final
- startHour → int
-
The hour at which the calendar starts displaying time slots.
final
- style → EventCalendarStyle
-
The style configuration for the calendar, allowing customization of appearance.
final
- timeSlotBuilder → Widget Function(BuildContext, DateTime)?
-
Builder for time slots, allowing customization of how each time slot is displayed.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< EventCalendar> -
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, int wrapWidth = 65}) → 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