Currency.fromJson constructor

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

Creates a Currency instance from a JSON map.

Implementation

factory Currency.fromJson(Map<String, dynamic> json) {
  return Currency(
    code: json['code'] as String,
    name: json['name'] as String,
    symbol: json['symbol'] as String,
    // Não carrega countries/country do JSON por padrão
  );
}