Metadata constructor

Metadata({
  1. String pubKey = "",
  2. String? name,
  3. String? displayName,
  4. String? picture,
  5. String? banner,
  6. String? website,
  7. String? about,
  8. String? nip05,
  9. String? lud16,
  10. String? lud06,
  11. int? updatedAt,
  12. int? refreshedTimestamp,
  13. List<List<String>>? tags,
  14. Map<String, dynamic>? content,
})

basic metadata nostr

Implementation

Metadata({
  this.pubKey = "",
  String? name,
  String? displayName,
  String? picture,
  String? banner,
  String? website,
  String? about,
  String? nip05,
  String? lud16,
  String? lud06,
  this.updatedAt,
  this.refreshedTimestamp,
  List<List<String>>? tags,
  Map<String, dynamic>? content,
})  : tags = tags ?? [],
      content = content ?? {} {
  // Initialize content with provided known fields
  if (name != null) this.name = name;
  if (displayName != null) this.displayName = displayName;
  if (picture != null) this.picture = picture;
  if (banner != null) this.banner = banner;
  if (website != null) this.website = website;
  if (about != null) this.about = about;
  if (nip05 != null) this.nip05 = nip05;
  if (lud16 != null) this.lud16 = lud16;
  if (lud06 != null) this.lud06 = lud06;
}