ISO4217Currency.fromJson constructor

ISO4217Currency.fromJson(
  1. Map<String, dynamic> json
)

Creates an ISO4217Currency instance from a JSON object.

The json map is expected to contain the necessary fields:

  • code (String)
  • numCode (int)
  • digits (int)
  • currencyName (String)
  • locations List String

Implementation

factory ISO4217Currency.fromJson(Map<String, dynamic> json) {
  return ISO4217Currency(
    code: json['code'],
    numCode: json['num_code'],
    digits: json['digits'],
    currencyName: json['currency_name'],
    locations: List<String>.from(json['locations']),
  );
}