KalenderController class Controllers and callbacks

Holds the ViewConfiguration and Location of a calendar and the ViewController a KalenderView shows.

Setting viewConfiguration switches the view. Setting location recreates it in the new location.

With several KalenderViews mounted on one controller, the one mounted last follows a switch and navigation.

Navigation while no KalenderView is mounted replaces viewController with one that opens on the target, and the next view opens there. A time of day from animateToDateTime or animateToEvent opens the view scrolled to it.

Inheritance

Constructors

KalenderController({required ViewConfiguration viewConfiguration, Location? location})

Properties

floatingVisibleRange → ValueListenable<FloatingDateTimeRange>
The ViewController.floatingVisibleRange of viewController.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
id → int
Unique to this instance. The drag targets compare it to decide whether a create gesture belongs to their calendar.
final
internalFocus → bool
no setter
location ↔ Location?
The location of the calendar. Null uses the device's local time.
getter/setter pair
newEvent → KalenderEvent?
no setterinherited
openDayOverlay → ValueNotifier<FloatingDateTime?>
The day whose overlay is open, or null when none is.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedEvent → ValueNotifier<KalenderEvent?>
The event currently being focused on.
no setter
selectedEventId → String?
no setter
selectedRange → ValueNotifier<FloatingDateTimeRange?>
The selected days, or null when nothing is selected.
final
viewConfiguration ↔ ViewConfiguration
The configuration of the view.
getter/setter pair
viewController → ViewController
The view controller of the active KalenderView.
no setter
visibleDateTimeRange → ValueListenable<KalenderDateTimeRange>
The floatingVisibleRange in location.
no setter
visibleEvents → ValueListenable<Set<KalenderEvent>>
The ViewController.visibleEvents of viewController.
no setter
visibleTimeOfDay → ValueListenable<KalenderTime?>
The KalenderTime aligned with the top of the viewport of a multi-day view. It follows scrolling and zooming, and is null in the month and schedule views.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
animateToDate(DateTime date, {Duration? duration, Curve? curve}) → Future<void>
Animate to the date part of the given DateTime.
animateToDateTime(DateTime date, {Duration? pageDuration, Curve? pageCurve, Duration? scrollDuration, Curve? scrollCurve}) → Future<void>
Animate to the date and time parts of the given DateTime.
animateToEvent(KalenderEvent event, {Duration? pageDuration, Curve? pageCurve, Duration? scrollDuration, Curve? scrollCurve, bool centerEvent = true}) → Future<void>
Animate to the given KalenderEvent.
animateToNextPage({Duration? duration, Curve? curve}) → Future<void>
Animate to the next page.
animateToPreviousPage({Duration? duration, Curve? curve}) → Future<void>
Animate to the previous page.
clearNewEvent() → void
inherited
deselectEvent() → void
Deselect the event.
deselectRange() → void
Clears the selection.
dispose() → void
Discards any resources used by the object.
override
hideDayOverlay() → void
Closes the open day overlay.
isDateSelected(DateTime date) → bool
Whether date falls on a selected day.
jumpToDate(DateTime date) → void
Jump to the given DateTime.
jumpToPage(int page) → void
Jump to the given page.
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
selectDate(DateTime date, {bool navigate = false}) → void
Selects the day of date.
selectEvent(KalenderEvent event, {bool internal = false}) → void
Place focus on an event.
selectRange(KalenderDateTimeRange range, {bool navigate = false}) → void
Selects every day range covers.
setNewEvent(KalenderEvent event) → void
inherited
showDayOverlay(DateTime date, {bool navigate = false}) → Future<void>
Opens the overlay listing the events of the day of date.
toString() → String
A string representation of this object.
inherited
updateEvent(KalenderEvent event, {bool internal = false}) → void

Operators

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