formatUnitsByInt method

dynamic formatUnitsByInt(
  1. BigInt value, {
  2. int unit = 18,
})

========================================================================== Conversion

Implementation

formatUnitsByInt(
  BigInt value, {
  int unit = 18,
}) {
  if (unit == 0) {
    return value;
  }

  return Decimal.parse((value / BigInt.from(10).pow(unit)).toString())
      .toString();
}