DateController class
Controls the visible dates in Timetable widgets.
You can read (and listen to) the currently visible dates via date.
To programmatically change the visible dates, use any of the following functions:
- animateToToday, animateTo, or animateToPage if you want an animation
- jumpToToday, jumpTo, or jumpToPage if you don't want an animation
You can also get and update the VisibleDateRange via visibleRange.
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
DatePageValueWithScrollActivity> - DateController
Constructors
- DateController({DateTime? initialDate, VisibleDateRange? visibleRange})
Properties
-
date
→ ValueListenable<
DateTime> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isDisposed → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ DatePageValueWithScrollActivity
-
The current value stored in this notifier.
getter/setter pairinherited
-
visibleDates
→ ValueListenable<
Interval> -
no setter
- visibleRange ↔ VisibleDateRange
-
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
animateTo(
DateTime date, {Curve curve = Curves.easeInOut, Duration duration = const Duration(milliseconds: 200), required TickerProvider vsync}) → Future< void> -
animateToPage(
double page, {Curve curve = Curves.easeInOut, Duration duration = const Duration(milliseconds: 200), required TickerProvider vsync}) → Future< void> -
animateToToday(
{Curve curve = Curves.easeInOut, Duration duration = const Duration(milliseconds: 200), required TickerProvider vsync}) → Future< void> -
cancelAnimation(
) → void -
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
override
-
jumpTo(
DateTime date) → void -
jumpToPage(
double page) → void -
jumpToToday(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited