toBigInt function

int toBigInt(
  1. num? number
)

Convert any number into a big int for 10^8 decimals @param {num} Number to convert

Implementation

int toBigInt(num? number) {
  if (number == null) {
    return 0;
  }
  return (Decimal.parse(number.toString()) * Decimal.parse('100000000'))
      .toDouble()
      .floor();
}