copyWith method
DatumSyncMetadata
copyWith({
- DateTime? lastSyncTime,
- DateTime? lastSuccessfulSyncTime,
- String? dataHash,
- String? deviceId,
- Map<
String, DateTime> ? devices, - Map<
String, dynamic> ? customMetadata, - Map<
String, DatumEntitySyncDetails> ? entityCounts, - SyncStatus? syncStatus,
- int? syncVersion,
- DateTime? serverTimestamp,
- int? conflictCount,
- String? errorMessage,
- int? retryCount,
- int? syncDuration,
Creates a copy with modified fields.
Implementation
DatumSyncMetadata copyWith({
DateTime? lastSyncTime,
DateTime? lastSuccessfulSyncTime,
String? dataHash,
String? deviceId,
Map<String, DateTime>? devices,
Map<String, dynamic>? customMetadata,
Map<String, DatumEntitySyncDetails>? entityCounts,
SyncStatus? syncStatus,
int? syncVersion,
DateTime? serverTimestamp,
int? conflictCount,
String? errorMessage,
int? retryCount,
int? syncDuration,
}) {
return DatumSyncMetadata(
userId: userId,
lastSyncTime: lastSyncTime ?? this.lastSyncTime,
lastSuccessfulSyncTime: lastSuccessfulSyncTime ?? this.lastSuccessfulSyncTime,
dataHash: dataHash ?? this.dataHash,
deviceId: deviceId ?? this.deviceId,
devices: devices ?? this.devices,
customMetadata: customMetadata ?? this.customMetadata,
entityCounts: entityCounts ?? this.entityCounts,
syncStatus: syncStatus ?? this.syncStatus,
syncVersion: syncVersion ?? this.syncVersion,
serverTimestamp: serverTimestamp ?? this.serverTimestamp,
conflictCount: conflictCount ?? this.conflictCount,
errorMessage: errorMessage ?? this.errorMessage,
retryCount: retryCount ?? this.retryCount,
syncDuration: syncDuration ?? this.syncDuration,
);
}