ArbitAmount.fromUnitAndValue constructor

ArbitAmount.fromUnitAndValue(
  1. ArbitUnit unit,
  2. dynamic amount
)

Constructs an amount of Arbit by a unit and its amount. amount can either be a base10 string, an int, or any numerical value.

Implementation

factory ArbitAmount.fromUnitAndValue(ArbitUnit unit, dynamic amount) {
  return ArbitAmount.inNanoarbit(
      quantity: parseValue(amount) * _factors[unit]!);
}