Operation.fromMap constructor
Operation.fromMap(
- Map<String, dynamic> map
)
Implementation
factory Operation.fromMap(Map<String, dynamic> map) {
return Operation(
map["type"],
OperationIdentifier.fromMap(map["operation_identifier"]),
map["related_operations"] != null
? (map["related_operations"] as List)
.map((e) => OperationIdentifier.fromMap(e))
.toList()
: null,
map["status"],
map["account"] != null ? AccountIdentifier.fromMap(map["account"]) : null,
map["amount"] != null ? Amount.fromMap(map["amount"]) : null,
map["coin_change"] != null
? CoinChange.fromMap(map["coin_change"])
: null,
map["metadata"],
);
}