SingleCalendarValue class

Calendar value representing a single selected date.

Encapsulates a single DateTime selection and provides lookup functionality to determine if a given date matches the selected date. Used primarily with CalendarSelectionMode.single.

Example:

final singleValue = SingleCalendarValue(DateTime(2024, 3, 15));
final lookup = singleValue.lookup(2024, 3, 15);
print(lookup == CalendarValueLookup.selected); // true
Inheritance

Constructors

SingleCalendarValue(DateTime date)
Creates a single calendar value with the specified date.

Properties

date DateTime
The selected date.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
view CalendarView
Returns the calendar view associated with this value.
no setteroverride

Methods

lookup(int year, [int? month, int? day]) CalendarValueLookup
Looks up whether the specified date is part of this calendar value.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMulti() MultiCalendarValue
Converts this value to a multi calendar value.
override
toRange() RangeCalendarValue
Converts this value to a range calendar value.
override
toSingle() SingleCalendarValue
Converts this value to a single calendar value.
override
toString() String
A string representation of this object.
override

Operators

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