SyncChange class
One row in a SyncEnvelope.
tableName is the local table name (matches
EntityMeta.tableName). pk is the primary
key value (serialised as a String for
transport). payload is the row data (a
Map<String, Object?> of column names to
values) — for delete changes, this is
null. version is a monotonically increasing
number (e.g. a millisecond timestamp) used for
last-write-wins conflict resolution.
Constructors
-
SyncChange({required String tableName, required String pk, required SyncChangeType type, required Map<
String, Object?> ? payload, required int version}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
payload
→ Map<
String, Object?> ? -
The row data, or
nullfordelete.final - pk → String
-
The primary key value (serialised as a
String for transport).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tableName → String
-
The local table name.
final
- type → SyncChangeType
-
The kind of change.
final
- version → int
-
Monotonically increasing version number
(used for last-write-wins).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
JSON serialisation (for
RestSyncProvider). The wire format is a flat map with one string for the type (so it's stable across renames). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited