CoinsResponse.fromJson constructor

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

Implementation

factory CoinsResponse.fromJson(Map<String, dynamic> json) => CoinsResponse(
      id: json["id"],
      symbol: json["symbol"],
      name: json["name"],
      assetPlatformId: json["asset_platform_id"],
      blockTimeInMinutes: json["block_time_in_minutes"],
      hashingAlgorithm: json["hashing_algorithm"],
      categories: List<String>.from(json["categories"].map((x) => x)),
      publicNotice: json["public_notice"],
      localization: Tion.fromJson(json["localization"]),
      description: Tion.fromJson(json["description"]),
      links: Links.fromJson(json["links"]),
      image: Image.fromJson(json["image"]),
      countryOrigin: json["country_origin"],
      genesisDate: json["genesis_date"],
      sentimentVotesUpPercentage:
          json["sentiment_votes_up_percentage"].toDouble(),
      sentimentVotesDownPercentage:
          json["sentiment_votes_down_percentage"].toDouble(),
      marketCapRank: json["market_cap_rank"],
      coingeckoRank: json["coingecko_rank"],
      coingeckoScore: json["coingecko_score"].toDouble(),
      developerScore: json["developer_score"].toDouble(),
      communityScore: json["community_score"].toDouble(),
      liquidityScore: json["liquidity_score"].toDouble(),
      publicInterestScore: json["public_interest_score"].toDouble(),
      marketData: MarketData.fromJson(json["market_data"]),
      communityData: CommunityData.fromJson(json["community_data"]),
      developerData: DeveloperData.fromJson(json["developer_data"]),
      publicInterestStats:
          PublicInterestStats.fromJson(json["public_interest_stats"]),
      statusUpdates: List<dynamic>.from(json["status_updates"].map((x) => x)),
      lastUpdated: DateTime.parse(json["last_updated"]),
      tickers:
          List<Ticker>.from(json["tickers"].map((x) => Ticker.fromJson(x))),
    );