SyncBatchResult class

--- SyncBatchResult --- Result of fetching a batch of items from the server or local storage. Supports checkpoint-based pagination.

Termination of pagination is signalled by the presence (or absence) of a checkpoint (cursor/afterId) returned by the server, or by an empty items list. This follows cursor/next-id style APIs.

Constructors

SyncBatchResult({required bool success, List<SyncPayload<ServerItem>> items = const [], SyncCheckpoint? checkpoint, String? errorMessage})
SyncBatchResult.failure(String errorMessage)
Failure factory
factory
SyncBatchResult.success({required List<SyncPayload<ServerItem>> items, SyncCheckpoint? checkpoint})
Success factory
factory

Properties

checkpoint SyncCheckpoint?
Checkpoint for the next page (typically last item's syncId). Used for resumable pagination: WHERE syncId > checkpoint.afterId
final
errorMessage String?
Error message if the operation failed
final
hashCode int
The hash code for this object.
no setterinherited
items List<SyncPayload<ServerItem>>
List of items in this batch
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
success bool
True if the operation succeeded
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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