SaveEnvelope class

Wrapper around a JSON-safe payload with schema metadata.

Constructors

SaveEnvelope({required int schemaVersion, required int createdAtMs, required int updatedAtMs, required Map<String, dynamic> payload, SaveChangeSet? changeSet, String? saveReason, String? checksum})
Creates a save envelope with schema/timestamp metadata.
const

Properties

changeSet SaveChangeSet?
Optional change set describing what changed.
final
checksum String?
Optional checksum over the payload.
final
createdAtMs int
Creation timestamp in milliseconds since epoch.
final
hashCode int
The hash code for this object.
no setterinherited
payload Map<String, dynamic>
JSON-safe payload.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saveReason String?
Optional reason describing why the save was written.
final
schemaVersion int
Schema version of the payload.
final
updatedAtMs int
Last update timestamp in milliseconds since epoch.
final

Methods

copyWith({int? schemaVersion, int? createdAtMs, int? updatedAtMs, Map<String, dynamic>? payload, Object? changeSet = _sentinel, Object? saveReason = _sentinel, Object? checksum = _sentinel}) SaveEnvelope
Returns a copy with selected fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes the envelope to a JSON-safe map.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) SaveEnvelope
Parses an envelope from a JSON-safe map.