PlannerEntry<T> class

A single event drawn on the planner: its id, its time (day column / start / duration), display title/content, fill color and text styles, plus an optional typed data payload (#77) for carrying app domain metadata.

Generic over the data payload type T (#77): an untyped PlannerEntry(...) infers T == dynamic and behaves exactly as before, while PlannerEntry<ActivityMeta>(...) makes data a typed ActivityMeta?. The type threads through PlannerConfig<T>, Planner<T> and the entry callbacks, so a host reads entry.data already typed — no side-map keyed by id and no cast. It is the foundation for the custom event/chip builders (#75/#78): the package itself never reads data, it only carries it through.

Immutable (#27): every field is final, so a drag/resize or accessibility nudge produces a new instance via copyWith (carrying a new PlannerTime) reported through the host callbacks, instead of mutating the entry in place. Value == means two entries with the same fields compare equal, so hosts can diff entry lists.

Constructors

PlannerEntry({required String id, required PlannerTime time, required String title, required String content, required Color color, T? data, TextStyle titleStyle = const TextStyle(fontWeight: FontWeight.bold, fontSize: 12, color: Colors.white), TextStyle textStyle = const TextStyle(fontSize: 10, color: Colors.white)})
const

Properties

color Color
final
content String
final
data → T?
Optional app domain metadata carried alongside the event (#77), typed T. The package never reads it — it threads it through so custom event/chip builders and the host callbacks get the typed value back. null when no payload is supplied (and always null for an untyped T == dynamic entry that omits it).
final
hashCode int
The hash code for this object.
no setteroverride
id String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textStyle TextStyle
final
time PlannerTime
final
title String
final
titleStyle TextStyle
final

Methods

copyWith({String? id, PlannerTime? time, Color? color, TextStyle? titleStyle, TextStyle? textStyle, String? title, String? content, T? data}) PlannerEntry<T>
Returns a copy with the given fields replaced; omitted fields are kept.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override