CoinHistory.fromJson constructor
CoinHistory.fromJson(
- Map<String, dynamic> json
)
Implementation
CoinHistory.fromJson(Map<String, dynamic> json)
: this.id = Convert.toStr(json['id'], ''),
this.symbol = Convert.toStr(json['symbol'], ''),
this.name = Convert.toStr(json['name'], ''),
this.localization = json.containsKey('localization')
? LocalizedString.fromJson(json['localization'])
: null,
this.image = json.containsKey('image')
? ImageInfo.fromJson(json['image'])
: null,
this.marketData = Helpers.parseMarketData(json['market_data']),
this.communityData = json.containsKey('community_data')
? CoinCommunityData.fromJson(json['community_data'])
: null,
this.developerData = json.containsKey('developer_data')
? CoinDeveloperData.fromJson(json['developer_data'])
: null,
this.publicInterestStats = json.containsKey('public_interest_stats')
? CoinPublicInterestsStats.fromJson(json['public_interest_stats'])
: null;