copyWith method

SyncLog copyWith({
  1. String? syncId,
  2. String? entityType,
  3. String? entityId,
  4. SyncOperation? operation,
  5. String? dataJson,
  6. bool? isFileToUpload,
  7. bool? isSynced,
  8. int? retryCount,
  9. String? lastError,
  10. DateTime? createdAt,
  11. DateTime? lastAttemptAt,
  12. DateTime? syncedAt,
})

Implementation

SyncLog copyWith({
  String? syncId,
  String? entityType,
  String? entityId,
  SyncOperation? operation,
  String? dataJson,
  bool? isFileToUpload,
  bool? isSynced,
  int? retryCount,
  String? lastError,
  DateTime? createdAt,
  DateTime? lastAttemptAt,
  DateTime? syncedAt,
}) {
  return SyncLog(
    syncId: syncId ?? this.syncId,
    entityType: entityType ?? this.entityType,
    entityId: entityId ?? this.entityId,
    operation: operation ?? this.operation,
    dataJson: dataJson ?? this.dataJson,
    isFileToUpload: isFileToUpload ?? this.isFileToUpload,
    isSynced: isSynced ?? this.isSynced,
    retryCount: retryCount ?? this.retryCount,
    lastError: lastError ?? this.lastError,
    createdAt: createdAt ?? this.createdAt,
    lastAttemptAt: lastAttemptAt ?? this.lastAttemptAt,
    syncedAt: syncedAt ?? this.syncedAt,
  );
}