CurrencyAmount.fromJson constructor
CurrencyAmount.fromJson(
- dynamic json
Factory method to create an instance of CurrencyAmount from JSON data.
The json
parameter represents the JSON data to parse.
Implementation
factory CurrencyAmount.fromJson(dynamic json) {
if (json is Map) {
return CurrencyAmount._(
null, IssuedCurrencyAmount.fromJson(json as Map<String, dynamic>));
}
return CurrencyAmount._(parseBigInt(json)!, null);
}