copyWith method

  1. @override
Nip01EventModel copyWith({
  1. String? id,
  2. String? pubKey,
  3. int? createdAt,
  4. int? kind,
  5. List<List<String>>? tags,
  6. String? content,
  7. String? sig,
  8. bool? validSig,
  9. List<String>? sources,
})
override

creates a copy of this event with the given fields replaced by the new values
needed so other packages depending on the extened nip01_event.dart can use copyWith

Implementation

@override
Nip01EventModel copyWith({
  String? id,
  String? pubKey,
  int? createdAt,
  int? kind,
  List<List<String>>? tags,
  String? content,
  String? sig,
  bool? validSig,
  List<String>? sources,
}) {
  return Nip01EventModel(
      id: id ?? this.id,
      pubKey: pubKey ?? this.pubKey,
      createdAt: createdAt ?? this.createdAt,
      kind: kind ?? this.kind,
      tags: tags ?? this.tags,
      content: content ?? this.content,
      sig: sig ?? this.sig,
      validSig: validSig ?? this.validSig,
      sources: sources ?? this.sources);
}