ADAAccountSummaryResponse.fromJson constructor
ADAAccountSummaryResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ADAAccountSummaryResponse.fromJson(Map<String, dynamic> json) {
final receivedSumList = json['received_sum'] as List;
final List<ADAAmountResponse> receivedSum = receivedSumList
.map((item) => ADAAmountResponse.fromJson(item))
.toList();
final sentSumList = json['sent_sum'] as List;
final 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'],
);
}