ExchangeRate class

This class models a reference to a money.

Implemented types
Annotations

Constructors

ExchangeRate({required DateTime dateTime, required Currency from, required Currency to, required double value})
A reference exchange rate from from currency to to currency.
const
ExchangeRate.fromMap(Map<String, dynamic> map)
Creates an ExchangeRate instance starting from a Map<String, dynamic> map.
ExchangeRate.fromString(String string)
Creates an ExchangeRate instance starting from a string.
factory

Properties

dateTime DateTime
Date and time in which the rate was retrieved.
final
from Currency
The base currency.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
to Currency
target currency.
final
value double
The value of the exchange rate.
final

Methods

compareTo(covariant ExchangeRate other) int
The order of the comparisons is:
override
copyWith({DateTime? dateTime, Currency? from, Currency? to, double? value}) ExchangeRate
Creates a copy of this Budget instance where the only changes are those specified in the parameters of this method.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Creates a Map<String, dynamic> map representation of this instance.
toString() String
A string representation of this object.
override

Operators

operator <(covariant ExchangeRate other) bool
Returns if this instance is less than the other.
operator <=(covariant ExchangeRate other) bool
Return if this instance is less than or equal to the other.
operator ==(covariant ExchangeRate other) bool
The equality operator.
override
operator >(covariant ExchangeRate other) bool
Return if this instance is greater than the other.
operator >=(covariant ExchangeRate other) bool
Return if this instance is greater than or equal to the other.