ADAAccountSummaryResponse.fromJson constructor
ADAAccountSummaryResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ADAAccountSummaryResponse.fromJson(Map<String, dynamic> json) {
var receivedSumList = json['received_sum'] as List;
List<ADAAmountResponse> receivedSum = receivedSumList
.map((item) => ADAAmountResponse.fromJson(item))
.toList();
var sentSumList = json['sent_sum'] as List;
List<ADAAmountResponse> sentSum =
sentSumList.map((item) => ADAAmountResponse.fromJson(item)).toList();
return ADAAccountSummaryResponse(
address: json["address"] ?? json['stake_address'],
receivedSum: receivedSum,
sentSum: sentSum,
txCount: json['tx_count'],
);
}