copyWith method

DatumSyncOperation<T> copyWith({
  1. String? id,
  2. String? userId,
  3. String? entityId,
  4. DatumOperationType? type,
  5. T? data,
  6. Map<String, dynamic>? delta,
  7. DateTime? timestamp,
  8. int? retryCount,
  9. int? sizeInBytes,
})

Creates a copy of this operation with updated fields.

Implementation

DatumSyncOperation<T> copyWith({
  String? id,
  String? userId,
  String? entityId,
  DatumOperationType? type,
  T? data,
  Map<String, dynamic>? delta,
  DateTime? timestamp,
  int? retryCount,
  int? sizeInBytes,
}) {
  return DatumSyncOperation<T>(
    id: id ?? this.id,
    userId: userId ?? this.userId,
    entityId: entityId ?? this.entityId,
    type: type ?? this.type,
    data: data ?? this.data,
    delta: delta ?? this.delta,
    timestamp: timestamp ?? this.timestamp,
    retryCount: retryCount ?? this.retryCount,
    sizeInBytes: sizeInBytes ?? this.sizeInBytes,
  );
}