copyWith method

TonNft copyWith({
  1. String? collectionAddress,
  2. String? address,
  3. String? ownerAddress,
  4. String? index,
  5. String? name,
  6. String? description,
  7. PhotoSize? image()?,
  8. PhotoSize? thumbnail()?,
  9. Document? content()?,
  10. Sticker? sticker()?,
  11. List<TonNftAttribute>? attributes,
  12. JsonValue? extraValue()?,
  13. UpgradedGift? gift()?,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

TonNft copyWith({
  String? collectionAddress,
  String? address,
  String? ownerAddress,
  String? index,
  String? name,
  String? description,
  PhotoSize? Function()? image,
  PhotoSize? Function()? thumbnail,
  Document? Function()? content,
  Sticker? Function()? sticker,
  List<TonNftAttribute>? attributes,
  JsonValue? Function()? extraValue,
  UpgradedGift? Function()? gift,
}) => TonNft(
  collectionAddress: collectionAddress ?? this.collectionAddress,
  address: address ?? this.address,
  ownerAddress: ownerAddress ?? this.ownerAddress,
  index: index ?? this.index,
  name: name ?? this.name,
  description: description ?? this.description,
  image: image != null ? image() : this.image,
  thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
  content: content != null ? content() : this.content,
  sticker: sticker != null ? sticker() : this.sticker,
  attributes: attributes ?? this.attributes,
  extraValue: extraValue != null ? extraValue() : this.extraValue,
  gift: gift != null ? gift() : this.gift,
);