DatumSyncStatusSnapshot class

An immutable snapshot describing the current sync state for a user.

Annotations
  • @immutable

Constructors

DatumSyncStatusSnapshot({required String userId, required DatumSyncStatus status, required int pendingOperations, required int completedOperations, required int failedOperations, required double progress, DateTime? lastStartedAt, DateTime? lastCompletedAt, List<Object> errors = const [], int syncedCount = 0, int conflictsResolved = 0, DatumHealth health = const DatumHealth(status: DatumSyncHealth.healthy)})
Creates a sync status snapshot.
const
DatumSyncStatusSnapshot.initial(String userId)
Creates an initial snapshot for a user.
factory

Properties

completedOperations int
Number of completed operations in the current cycle.
final
conflictsResolved int
Number of conflicts resolved in the current cycle.
final
errors List<Object>
Errors encountered during the sync.
final
failedOperations int
Number of failed operations in the current cycle.
final
hasFailures bool
Whether there are any failures.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasUnsyncedData bool
Whether there is unsynced data.
no setter
health DatumHealth
The current health status of this specific sync manager.
final
lastCompletedAt DateTime?
When the last sync completed.
final
lastStartedAt DateTime?
When the last sync started.
final
pendingOperations int
Number of operations waiting to sync.
final
progress double
Progress percentage (0.0 to 1.0) of the current cycle.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status DatumSyncStatus
Current high-level sync status.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
syncedCount int
Number of successfully synced operations in the current cycle.
final
userId String
User ID for this snapshot.
final

Methods

copyWith({DatumSyncStatus? status, int? pendingOperations, int? completedOperations, int? failedOperations, double? progress, DateTime? lastStartedAt, DateTime? lastCompletedAt, List<Object>? errors, int? syncedCount, int? conflictsResolved, DatumHealth? health}) DatumSyncStatusSnapshot
Creates a copy with modified fields.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.

Operators

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