Money.fromMap constructor
Creates an Money
instance starting from a Map<String, dynamic> map
.
This can be useful for retrieving the instance from a database.
Implementation
Money.fromMap(Map<String, dynamic> map)
: amount = double.parse('${map[_amountKey]}'),
currency = '${map[_currencyKey]}'.toCurrency();