copyWith method

DataChange copyWith({
  1. Relation? relation,
  2. DataChangeType? type,
  3. DbRecord? record()?,
  4. DbRecord? oldRecord()?,
  5. List<Tag>? tags,
})

Implementation

DataChange copyWith({
  Relation? relation,
  DataChangeType? type,
  DbRecord? Function()? record,
  DbRecord? Function()? oldRecord,
  List<Tag>? tags,
}) {
  return DataChange(
    relation: relation ?? this.relation,
    type: type ?? this.type,
    record: record?.call() ?? this.record,
    oldRecord: oldRecord?.call() ?? this.oldRecord,
    tags: tags ?? this.tags,
  );
}