decimalToBigInt function

BigInt decimalToBigInt(
  1. double value,
  2. int decimals
)

decimalToBigInt converts a given decimal number to big int

Implementation

BigInt decimalToBigInt(double value, int decimals) {
  return BigInt.from(value * pow(10, decimals).toInt());
}