Collection.fromJson constructor

Collection.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Collection.fromJson(Map<String, dynamic> json) => Collection(
      paymentTokens: json["payment_tokens"] == null
          ? null
          : List<PaymentTokenElement>.from(json["payment_tokens"]
              .map((x) => PaymentTokenElement.fromJson(x))),
      primaryAssetContracts: json["primary_asset_contracts"] == null
          ? null
          : List<AssetContract>.from(json["primary_asset_contracts"]
              .map((x) => AssetContract.fromJson(x))),
      traits: json["traits"] == null ? null : Traits.fromJson(json["traits"]),
      stats: json["stats"] == null
          ? null
          : Map.from(json["stats"])
              .map((k, v) => MapEntry<String, double>(k, v.toDouble())),
      bannerImageUrl: json["banner_image_url"],
      chatUrl: json["chat_url"],
      createdDate: json["created_date"] == null
          ? null
          : DateTime.parse(json["created_date"]),
      defaultToFiat: json["default_to_fiat"],
      description: json["description"],
      devBuyerFeeBasisPoints: json["dev_buyer_fee_basis_points"],
      devSellerFeeBasisPoints: json["dev_seller_fee_basis_points"],
      discordUrl: json["discord_url"],
      displayData: json["display_data"] == null
          ? null
          : DisplayData.fromJson(json["display_data"]),
      externalUrl: json["external_url"],
      featured: json["featured"],
      featuredImageUrl: json["featured_image_url"],
      hidden: json["hidden"],
      safelistRequestStatus: json["safelist_request_status"],
      imageUrl: json["image_url"],
      isSubjectToWhitelist: json["is_subject_to_whitelist"],
      largeImageUrl: json["large_image_url"],
      mediumUsername: json["medium_username"],
      name: json["name"],
      onlyProxiedTransfers: json["only_proxied_transfers"],
      openseaBuyerFeeBasisPoints: json["opensea_buyer_fee_basis_points"],
      openseaSellerFeeBasisPoints: json["opensea_seller_fee_basis_points"],
      payoutAddress: json["payout_address"],
      requireEmail: json["require_email"],
      shortDescription: json["short_description"],
      slug: json["slug"],
      telegramUrl: json["telegram_url"],
      twitterUsername: json["twitter_username"],
      instagramUsername: json["instagram_username"],
      wikiUrl: json["wiki_url"],
    );