CurrencyAmount.fromJson constructor

CurrencyAmount.fromJson(
  1. 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);
}