PolyAmount.fromUnitAndValue constructor
PolyAmount.fromUnitAndValue(
- PolyUnit unit,
- dynamic amount
Constructs an amount of Poly by a unit and its amount. amount
can
either be a base10 string, an int, or any numerical value.
Implementation
factory PolyAmount.fromUnitAndValue(PolyUnit unit, dynamic amount) {
return PolyAmount.inNanopoly(
quantity: parseValue(amount) * _factors[unit]!);
}