DatePickerController class

Constructors

DatePickerController()

Properties

hashCode int
The hash code for this object.
no setterinherited
isAttached bool
Whether this controller is attached to a mounted DatePicker.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedDates List<DateTime>
An unmodifiable snapshot of the selection, oldest-first ([start, end] in range mode). [] when detached or empty.
no setter

Methods

animateToDate(DateTime date, {Duration duration = const Duration(milliseconds: 500), Curve curve = Curves.linear}) → void
This function will animate to any date that is passed as an argument In case a date is out of range nothing will happen
animateToSelection({Duration duration = const Duration(milliseconds: 500), Curve curve = Curves.linear}) → void
This function will animate the Timeline to the most recently selected date. Does nothing if no date is selected or the picker isn't laid out yet.
clearSelection() → void
Empties the selection (and the scroll anchor) in every mode. No-op when detached. Fires no callbacks.
deselect(DateTime date) → void
Removes date from the selection. No-op when detached, when date isn't selected, or in range mode (use clearSelection or selectRange). Does not scroll and fires no callbacks.
jumpToSelection() → void
Jumps to the most recently selected date. Does nothing if no date is selected or the picker isn't laid out yet.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
select(DateTime date) → void
Adds date per the current SelectionMode: replaces the selection in single mode, appends (or keeps) it in multiple mode, and sets or completes the range in range mode. No-op when detached or date is outside the rendered range. Does not scroll and fires no callbacks.
selectRange(DateTime start, DateTime end) → void
Sets both range endpoints at once, swapping them when reversed. No-op when detached, outside SelectionMode.range, or when either date is outside the rendered range. Does not scroll and fires no callbacks.
setDateAndAnimate(DateTime date, {Duration duration = const Duration(milliseconds: 500), Curve curve = Curves.linear}) → void
This function will animate to any date that is passed as an argument. The selection becomes exactly [date] in every mode. In case a date is out of range nothing will happen
setDatePickerState(_DatePickerState state) → void
toString() String
A string representation of this object.
inherited

Operators

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