ExchangeRate.fromJson constructor

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

Constructs an ExchangeRate instance from a JSON map.

The json parameter is a map containing the exchange rate data.

Implementation

ExchangeRate.fromJson(Map<String, dynamic> json)
    : this.name = Convert.toStr(json['name'], ''),
      this.unit = Convert.toStr(json['unit'], ''),
      this.value = Convert.toDouble(json['value'], 0),
      this.type = Convert.toStr(json['type'], '');