TimeController class

Controls the visible time range and zoom factor in a MultiDateTimetable (or RecurringMultiDateTimetable).

You can programmatically change those via animateToShowFullDay, animateTo, jumpToShowFullDay, or by directly setting the value.

Inheritance

Constructors

TimeController({Duration minDuration = const Duration(minutes: 1), Duration? maxDuration, TimeRange? initialRange, TimeRange? maxRange, double? minDayHeight})

Properties

actualMaxDuration Duration
The maximum visible duration, honoring maxDuration and minDayHeight.
no setter
actualMinDuration Duration
The minimum visible duration, honoring minDuration and minDayHeight.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
innerDateHours List<int>
no setter
maxDuration Duration
The maximum visible duration when zooming out.
final
maxDurationFromMinDayHeight Duration?
The maximum visible duration when zooming out when evaluating minDayHeight against all registered clients (i.e., widgets using this controller).
no setter
maxDurationFromMinDayHeightOrDefault Duration
no setter
maxRange TimeRange
The maximum range that can be revealed when zooming out.
final
minClientHeight double?
The minimum height of all TimeControllerClientRegistrations.
no setter
minDayHeight double?
The minimum height that a full day can span when zooming out.
final
minDuration Duration
The minimum visible duration when zooming in.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value TimeRange
The current value stored in this notifier.
getter/setter pairinherited-getteroverride-setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
animateTo(TimeRange newValue, {Curve curve = Curves.easeInOut, Duration duration = const Duration(milliseconds: 200), required TickerProvider vsync}) Future<void>
animateToShowFullDay({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).
inherited
jumpTo(TimeRange range) → void
jumpToShowFullDay() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
registerClient(double height) TimeControllerClientRegistration
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

Constants

maxPossibleDuration → const Duration