TonNft constructor

const TonNft({
  1. @JsonKey.new(name: 'address') required String address,
  2. @JsonKey.new(name: 'index') required String index,
  3. @JsonKey.new(name: 'name') required String name,
  4. @JsonKey.new(name: 'description') required String description,
  5. @JsonKey.new(name: 'collection_address') String? collectionAddress,
  6. @JsonKey.new(name: 'attributes') List<TonNftAttribute>? attributes,
  7. @JsonKey.new(name: 'gift') UniqueGift? gift,
})

Creates a TonNft.

Implementation

const factory TonNft({
  /// Address of the NFT.
  @JsonKey(name: 'address') required String address,

  /// Index within its collection, as a decimal string.
  @JsonKey(name: 'index') required String index,

  /// Name of the NFT.
  @JsonKey(name: 'name') required String name,

  /// Description of the NFT.
  @JsonKey(name: 'description') required String description,

  /// Address of the collection, if known.
  @JsonKey(name: 'collection_address') String? collectionAddress,

  /// Attributes of the NFT, if provided.
  @JsonKey(name: 'attributes') List<TonNftAttribute>? attributes,

  /// Unique gift corresponding to the NFT, if any.
  @JsonKey(name: 'gift') UniqueGift? gift,
}) = _TonNft;