copyWith method

NostrEvent copyWith({
  1. String? id,
  2. int? kind,
  3. String? content,
  4. String? sig,
  5. String? pubkey,
  6. DateTime? createdAt,
  7. List<List<String>>? tags,
  8. String? subscriptionId,
  9. String? ots,
})

This represents a low level Nostr event that requires setting all fields manually, which requires you to doo all encodings... You can use NostrEvent.fromPartialData to create an event with less fields and lower complexity..

Implementation

NostrEvent copyWith({
  String? id,
  int? kind,
  String? content,
  String? sig,
  String? pubkey,
  DateTime? createdAt,
  List<List<String>>? tags,
  String? subscriptionId,
  String? ots,
}) {
  return NostrEvent(
    id: id ?? this.id,
    kind: kind ?? this.kind,
    content: content ?? this.content,
    sig: sig ?? this.sig,
    pubkey: pubkey ?? this.pubkey,
    createdAt: createdAt ?? this.createdAt,
    tags: tags ?? this.tags,
    subscriptionId: subscriptionId ?? this.subscriptionId,
    ots: ots ?? this.ots,
  );
}