ModulaCalendar class
A customizable calendar widget for date selection
Example:
ModulaCalendar(
selectedDate: DateTime.now(),
onDateSelected: (date) {
print('Selected: $date');
},
viewMode: ModulaCalendarViewMode.month,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ModulaCalendar
Constructors
-
ModulaCalendar({Key? key, DateTime? selectedDate, DateTime? firstDate, DateTime? lastDate, DateTime? currentDate, ModulaCalendarViewMode viewMode = ModulaCalendarViewMode.month, bool multiSelect = false, List<
DateTime> selectedDates = const [], void onDateSelected(DateTime date)?, void onMultipleDatesSelected(List<DateTime> dates)?, Widget dayBuilder({DateTime date, bool isSelected, bool isToday})?, List<DateTime> disabledDates = const [], bool showWeekNumbers = false, int firstDayOfWeek = 0}) -
const
Properties
- currentDate → DateTime?
-
Current displayed date
final
- dayBuilder → Widget Function({DateTime date, bool isSelected, bool isToday})?
-
Custom date builder
final
-
disabledDates
→ List<
DateTime> -
Disabled dates
final
- firstDate → DateTime?
-
First selectable date
final
- firstDayOfWeek → int
-
First day of week (0 = Sunday, 1 = Monday, etc.)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lastDate → DateTime?
-
Last selectable date
final
- multiSelect → bool
-
Whether to allow multiple selection
final
- onDateSelected → void Function(DateTime date)?
-
Callback when date is selected
final
-
onMultipleDatesSelected
→ void Function(List<
DateTime> dates)? -
Callback when multiple dates are selected
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedDate → DateTime?
-
Currently selected date
final
-
selectedDates
→ List<
DateTime> -
Selected dates (for multiSelect)
final
- showWeekNumbers → bool
-
Show week numbers
final
- viewMode → ModulaCalendarViewMode
-
Calendar view mode
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ModulaCalendar> -
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