CalendarBackend class abstract

A pluggable calendar backend. Implementations wrap caldav, device_calendar_plus, or an in-memory fake. All methods may throw; the fail-safe wrapping lives in UnicalClient, not here.

Task methods (listTasks/upsertTask/deleteTask) must throw UnsupportedError when capabilities().supportsVtodo is false.

Implementers

Constructors

CalendarBackend()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

capabilities() → Future<Capabilities>
Describes what this backend can preserve.
deleteEvent(String ref) → Future<void>
Deletes the event identified by ref.
deleteTask(String ref) → Future<void>
Deletes the task identified by ref. Throws UnsupportedError if unsupported.
listEvents({DateTime? start, DateTime? end}) → Future<List<RemoteEvent>>
Lists events overlapping the optional [start, end) window.
listTasks() → Future<List<RemoteTask>>
Lists native VTODO tasks. Throws UnsupportedError if unsupported.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
upsertEvent(UnicalEvent event, {String? ref, Map<String, String> xProps}) → Future<String>
Creates or updates event. Pass ref to update an existing object and xProps to attach invisible metadata (ignored by backends that cannot preserve them). Returns the backend ref.
upsertTask(UnicalTask task, {String? ref}) → Future<String>
Creates or updates a native VTODO. Throws UnsupportedError if unsupported. Returns the backend ref.

Operators

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