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: CoinsTion.fromJson(json['localization']),
      description: CoinsTion.fromJson(json['description']),
      links: CoinsLinks.fromJson(json['links']),
      image: CoinsImage.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: CoinsMarketData.fromJson(json['market_data']),
      communityData: CoinsCommunityData.fromJson(json['community_data']),
      developerData: CoinsDeveloperData.fromJson(json['developer_data']),
      publicInterestStats:
          CoinsPublicInterestStats.fromJson(json['public_interest_stats']),
      statusUpdates: List<dynamic>.from(json['status_updates'].map((x) => x)),
      lastUpdated: DateTime.parse(json['last_updated']),
      tickers: List<CoinsTicker>.from(
          json['tickers'].map((x) => CoinsTicker.fromJson(x))),
    );