fromWei static method

Decimal fromWei(
  1. BigInt value,
  2. int decimals
)

Implementation

static Decimal fromWei(
  BigInt value,
  int decimals,
) =>
    (Decimal.fromBigInt(
              value,
            ) /
            Decimal.fromBigInt(
              BigInt.from(
                pow(10, decimals),
              ),
            ))
        .toDecimal();