Fixed.fromBigInt constructor

Fixed.fromBigInt(
  1. BigInt minorUnits, {
  2. int scale = 2,
})

Creates a fixed scale decimal from minorUnits with the given scale.

scale defaults to 2 if not passed.

Implementation

Fixed.fromBigInt(BigInt minorUnits, {this.scale = 2}) {
  _checkScale(scale);
  value = Decimal.fromBigInt(minorUnits) / Decimal.ten.pow(scale);
}