copyWith method

DatumChangeDetail<T> copyWith({
  1. DatumOperationType? type,
  2. String? entityId,
  3. String? userId,
  4. T? data,
  5. DateTime? timestamp,
  6. String? sourceId,
})

Creates a copy of this object with modified fields.

Implementation

DatumChangeDetail<T> copyWith({
  DatumOperationType? type,
  String? entityId,
  String? userId,
  T? data,
  DateTime? timestamp,
  String? sourceId,
}) {
  return DatumChangeDetail<T>(
    type: type ?? this.type,
    entityId: entityId ?? this.entityId,
    userId: userId ?? this.userId,
    data: data ?? this.data,
    timestamp: timestamp ?? this.timestamp,
    sourceId: sourceId ?? this.sourceId,
  );
}