CalendarValue class abstract

Abstract base class representing calendar selection values.

Provides a unified interface for different types of calendar selections including single dates, date ranges, and multiple date collections. Handles date lookup operations and conversion between different selection types.

Subclasses include:

The class provides factory constructors for easy creation and conversion methods to transform between different selection types as needed.

Example:

// Create different value types
final single = CalendarValue.single(DateTime.now());
final range = CalendarValue.range(startDate, endDate);
final multi = CalendarValue.multi([date1, date2, date3]);

// Check if a date is selected
final lookup = value.lookup(2024, 3, 15);
final isSelected = lookup != CalendarValueLookup.none;
Implementers

Constructors

CalendarValue()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
view CalendarView
no setter

Methods

lookup(int year, [int? month = 1, int? day = 1]) CalendarValueLookup
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMulti() MultiCalendarValue
toRange() RangeCalendarValue
toSingle() SingleCalendarValue
toString() String
A string representation of this object.
inherited

Operators

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