copyWith method

PrismSyncSnapshot copyWith({
  1. PrismSyncPhase? phase,
  2. int? pendingChanges,
  3. int? completed,
  4. int? total,
  5. DateTime? lastSyncedAt,
  6. Object? error,
})

A copy with selected fields replaced.

Implementation

PrismSyncSnapshot copyWith({
  PrismSyncPhase? phase,
  int? pendingChanges,
  int? completed,
  int? total,
  DateTime? lastSyncedAt,
  Object? error,
}) {
  return PrismSyncSnapshot(
    phase: phase ?? this.phase,
    pendingChanges: pendingChanges ?? this.pendingChanges,
    completed: completed ?? this.completed,
    total: total ?? this.total,
    lastSyncedAt: lastSyncedAt ?? this.lastSyncedAt,
    error: error ?? this.error,
  );
}