copyWith method

ChangeDetail<T> copyWith({
  1. String? collectionName,
  2. int? objectId,
  3. String? key,
  4. ChangeType? changeType,
  5. DateTime? timestamp,
  6. T? fullDocument,
  7. List<FieldChange<DocumentSerializable>>? fieldChanges,
})

Creates a copy with modified fields.

Implementation

ChangeDetail<T> copyWith({
  String? collectionName,
  int? objectId,
  String? key,
  ChangeType? changeType,
  DateTime? timestamp,
  T? fullDocument,
  List<FieldChange>? fieldChanges,
}) => ChangeDetail<T>(
  collectionName: collectionName ?? this.collectionName,
  objectId: objectId ?? this.objectId,
  key: key ?? this.key,
  changeType: changeType ?? this.changeType,
  timestamp: timestamp ?? this.timestamp,
  fullDocument: fullDocument ?? this.fullDocument,
  fieldChanges: fieldChanges ?? this.fieldChanges,
);