copyWith method
Nip01EventModel
copyWith({
- String? id,
- String? pubKey,
- int? createdAt,
- int? kind,
- List<
List< ? tags,String> > - String? content,
- String? sig,
- bool? validSig,
- 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);
}