PaginatedCoins.fromJson constructor
PaginatedCoins.fromJson(
- dynamic data
Implementation
factory PaginatedCoins.fromJson(dynamic data) {
List<CoinStruct> list = [];
if (data['data'] != null) {
for (var coin in data['data']) {
list.add(CoinStruct.fromJson(coin));
}
}
return PaginatedCoins(
list,
data['nextCursor'],
data['hasNextPage'],
);
}