CoinTicker.fromJson constructor
CoinTicker.fromJson(
- Map<String, dynamic> json
)
Implementation
CoinTicker.fromJson(Map<String, dynamic> json) {
base = json['base'];
target = json['target'];
tradeUrl = json['trade_url'];
tokenInfoUrl = json['token_info_url'];
coinId = json['coin_id'];
market = Market.fromJson(json['market']);
last = StaticHelpers.checkDouble(json['last'],-1.0);
volume = StaticHelpers.checkDouble(json['volume'],-1.0);
bidAskSpreadPercentage = StaticHelpers.checkDouble(json['bid_ask_spread_percentage'],-1.0);
costToMoveDownUSD = StaticHelpers.checkDouble(json['cost_to_move_down_usd'],-1.0);
costToMoveUpUSD = StaticHelpers.checkDouble(json['cost_to_move_up_usd'],-1.0);
convertedLast = Converted.fromJson(json['converted_last']);
convertedVolume = Converted.fromJson(json['converted_volume']);
timestamp = DateTime.tryParse(json['timestamp'].toString());
lastTradedAt = DateTime.tryParse(json['last_traded_at'].toString());
lastFetchAt = DateTime.tryParse(json['last_fetch_at'].toString());
isAnomaly = json['is_anomaly'];
isState = json['is_state'];
}