Currency class

Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshi) to standard units (Bitcoin).

Annotations
  • @immutable

Constructors

Currency(String symbol, int decimals, Map<String, dynamic>? metadata)
const
Currency.fromJson(Map<String, dynamic> map)
factory

Properties

decimals int
Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10.
final
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, dynamic>?
Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbol String
Canonical symbol associated with a currency.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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