copyWith method

SentNostrEvent 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? 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

SentNostrEvent copyWith({
  String? id,
  int? kind,
  String? content,
  String? sig,
  String? pubkey,
  DateTime? createdAt,
  List<List<String>>? tags,
  String? ots,
}) {
  return SentNostrEvent(
    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,
    ots: ots ?? this.ots,
  );
}