SyncCheckpoint class

--- SyncCheckpoint --- Represents the sync state checkpoint for pagination.

Uses the monotonic syncId for deterministic ordering and resumable pagination. This approach ensures:

  1. Consistent ordering using monotonically increasing IDs
  2. Ability to resume from exact point after interruption
  3. Simple and efficient pagination (WHERE syncId > afterId)

Immutable value object following clean architecture principles.

Constructors

SyncCheckpoint({required BigInt afterId})
const
SyncCheckpoint.fromJson(Map<String, dynamic> json)
Deserialize from stored map
factory
SyncCheckpoint.fromSyncable(BigInt syncId)
Create checkpoint from a syncable item
factory

Properties

afterId BigInt
Fetch items AFTER this ID. Query: WHERE syncId > afterId Example: afterId=100 → fetch items 101, 102, 103...
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serialize to map for storage
toString() String
A string representation of this object.
override

Operators

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