Currency.fromJson constructor
Currency.fromJson(- Map<String, dynamic> json
)
Implementation
factory Currency.fromJson(Map<String, dynamic> json) => Currency(
id: json["id"],
code: json["code"],
type: json["type"],
mainExchange: json["main_exchange"],
createdAt: json["created_at"] == null
? null
: DateTime.parse(json["created_at"]),
updatedAt: json["updated_at"] == null
? null
: DateTime.parse(json["updated_at"]),
name: json["name"],
plural: json["plural"],
translations: json["translations"] == null
? null
: List<Translation>.from(
json["translations"].map((x) => Translation.fromJson(x))),
);