GlobalDefi.fromJson constructor
GlobalDefi.fromJson(
- Map<String, dynamic> json
)
Implementation
factory GlobalDefi.fromJson(Map<String, dynamic> json) {
json = json['data']??{};
return GlobalDefi(
defiMarketCap: StaticHelpers.checkDouble(json['defi_market_cap'],null),
ethMarketCap: StaticHelpers.checkDouble(json['eth_market_cap'],null),
defiToEthRatio: StaticHelpers.checkDouble(json['defi_to_eth_ratio'],null),
tradingVolume24h: StaticHelpers.checkDouble(json['trading_volume_24h'],null),
defiDominance: StaticHelpers.checkDouble(json['defi_dominance'],null),
topCoinName: json['top_coin_name'] as String?,
topCoinDefiDominance: StaticHelpers.checkDouble(json['top_coin_defi_dominance'], null),
);
}