PgDecimal.fromBigInt constructor

PgDecimal.fromBigInt(
  1. BigInt unscaledValue, {
  2. int scale = 0,
})

unscaledValue × 10^-scale. scale não pode ser negativa.

Implementation

factory PgDecimal.fromBigInt(BigInt unscaledValue, {int scale = 0}) {
  if (scale < 0) {
    throw ArgumentError.value(scale, 'scale', 'Must not be negative');
  }
  return PgDecimal._finiteValue(unscaledValue, scale);
}