Currency.fromJson constructor

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

Implementation

Currency.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  createdAt = json['createdAt'];
  baseCurrency = json['baseCurrency'];
  if (json['rates'] != null) {
    rates = <Rates>[];
    json['rates'].forEach((v) {
      rates!.add(Rates.fromJson(v));
    });
  }
}