Currency class

Represents a currency used in a country.

Constructors

Currency.new({required String code, required String name, required String symbol, Country? country, List<Country>? countries})
Currency.fromJson(Map<String, dynamic> json)
Creates a Currency instance from a JSON map.
factory

Properties

code String
The currency code (e.g., 'BRL' for Brazilian Real).
final
countries List<Country>?
Lista de países que usam essa moeda (pode ser nula para compatibilidade).
final
country Country?
O país principal associado à moeda (para compatibilidade e exibição).
final
hashCode int
The hash code for this object.
no setteroverride
name String
The name of the currency (e.g., 'Brazilian Real').
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbol String
The symbol of the currency (e.g., 'R$').
final

Methods

copyWith({String? code, String? name, String? symbol, Country? country, List<Country>? countries}) Currency
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the Currency instance to a JSON map.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override