SessionRecord class sealed

One entry in the append-only session tree.

Sealed counterpart of pi's SessionTreeEntry discriminated union. Every record has a unique id, an optional parentId forming the tree, and a timestamp. Dispatch on the concrete type (or type) to read the payload.

Implementers

Constructors

SessionRecord.fromJson(Map<String, dynamic> json)
Deserializes a record JSON map, dispatching on type.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
Unique record id (short random id generated by the storage).
final
parentId String?
Id of the parent record, or null for a tree root.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
When the record was created.
final
type String
The type discriminator written to JSON (pi's type field).
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
payloadJson() Map<String, dynamic>
Type-specific fields merged into toJson by subclasses.
toJson() Map<String, dynamic>
Serializes to a JSON map with the type discriminator (pi shape).
toString() String
A string representation of this object.
inherited

Operators

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