PrismSyncSnapshot class

An immutable snapshot of a sync engine's state.

Annotations

Constructors

PrismSyncSnapshot({required PrismSyncPhase phase, int pendingChanges = 0, int completed = 0, int? total, DateTime? lastSyncedAt, Object? error})
Creates a snapshot.
const
PrismSyncSnapshot.idle({DateTime? lastSyncedAt})
An idle snapshot, optionally dated.
const

Properties

completed → int
Items handled so far in the current phase.
final
error → Object?
The error from the last failure, if any.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData
The icon this state should be shown with.
no setter
isBusy → bool
Whether a sync is running.
no setter
isOffline → bool
Whether the engine is waiting for a connection.
no setter
isSettled → bool
Whether everything is up to date.
no setter
label → String
A short human-readable description.
no setter
lastSyncedAt → DateTime?
When the last fully successful sync finished.
final
pendingChanges → int
Local changes waiting to be uploaded.
final
phase → PrismSyncPhase
Which half of the cycle is running, or why it is not.
final
progress → double?
Progress in 0..1, or null when the total is unknown.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semantic → PrismSemantic
The semantic role this state should be painted with.
no setter
total → int?
Items expected in the current phase, when known.
final

Methods

copyWith({PrismSyncPhase? phase, int? pendingChanges, int? completed, int? total, DateTime? lastSyncedAt, Object? error}) → PrismSyncSnapshot
A copy with selected fields replaced.
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