DatepickerDateRange class abstract

A datepicker-specific implementation of DateRange, extended with a title and an interface for computing the next/previous date range.

Implemented types
Implementers

Constructors

DatepickerDateRange(String title, Date? start, Date? end, {RangeFn next = _genericNext, RangeFn prev = _genericPrev, bool isPredefined = false, bool isAllTime = false})
factory
DatepickerDateRange.custom(Date? start, Date? end)
Shortcut to define a "custom" date range with a localized "Custom" title and default behavior.
factory
DatepickerDateRange.fromProtoBuf(Clock clock, DatepickerDateRange pb)
Construct from the protocol buffer format defined in date_range.proto.
factory

Properties

end Date?
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isAllTime bool
true if this date range represents all available history.
no setter
isPredefined bool
Whether the date range is predefined by the application.
no setter
next DatepickerDateRange?
A date range which begins immediately after this one ends, and has either the same length or similar semantics (such as "the next month").
no setter
prev DatepickerDateRange?
A date range which ends immediately before this one starts, and has either the same length or similar semantics (such as "the previous year").
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start Date?
no setteroverride
title String
E.g. "Last 7 days", "This month", "Custom", etc.
no setter

Methods

asPlainRange() DateRange
Returns this range as a plain DateRange. This is needed because DateRange's equality is strict on types.
override
clamp({Date? min, Date? max}) DatepickerDateRange?
Clamps the current date range to the given min and max dates. Returns null if this range has no overlap with the given date range.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toProtoBuf() DatepickerDateRange
Convert this date range into the protocol buffer format defined in date_range.proto.
toString() String
A string representation of this object.
inherited
unclamped() DatepickerDateRange
Reverses the effect of one call to clamp() (assuming clamp() didn't return null). If clamp() succeeds, range.clamp(...).unclamped() == range.

Operators

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