copyWith method

Nip01Event copyWith({
  1. String? pubKey,
  2. int? createdAt,
  3. int? kind,
  4. List<List<String>>? tags,
  5. String? content,
  6. String? sig,
  7. List<String>? sources,
})

Implementation

Nip01Event copyWith({
  String? pubKey,
  int? createdAt,
  int? kind,
  List<List<String>>? tags,
  String? content,
  String? sig,
  List<String>? sources,
}) {
  final event = Nip01Event(
    pubKey: pubKey ?? this.pubKey,
    createdAt: createdAt ?? this.createdAt,
    kind: kind ?? this.kind,
    tags: tags ?? this.tags,
    content: content ?? this.content,
  );
  event.sig = sig ?? this.sig;
  event.sources = sources ?? this.sources;
  return event;
}