copyWith method

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

Creates a copy with modified fields.

Implementation

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