parseUnitsByEtherUnit method

dynamic parseUnitsByEtherUnit(
  1. String value, {
  2. EtherUnit unit = EtherUnit.ether,
})

Implementation

parseUnitsByEtherUnit(
  String value, {
  EtherUnit unit = EtherUnit.ether,
}) {
  return (Decimal.parse(value) * Decimal.ten.pow(_pows[unit]!)).toBigInt();
}