CalendarEvent class

A minimal calendar event: a stable id plus its start, end, and title. Apps with richer models can map to and from this for diffing.

Constructors

CalendarEvent({required String id, required DateTime start, required DateTime end, required String title})
Creates an event. end should not precede start; this is not enforced because a diff over malformed data should still classify, not throw. Audited: 2026-06-12 11:26 EDT
const

Properties

end → DateTime
Event end instant.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable identity used to pair events across the two snapshots.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
start → DateTime
Event start instant.
final
title → String
Human-readable title.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sameContentAs(CalendarEvent other) → bool
True when other has the same start, end, and title (id is identity, not content, so it is excluded from the content comparison). Audited: 2026-06-12 11:26 EDT
toString() → String
A string representation of this object.
override

Operators

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