Fixed.fromDecimal constructor
Fixed.fromDecimal(
- Decimal amount, {
- int scale = 16,
Implementation
Fixed.fromDecimal(Decimal amount, {this.scale = 16}) {
_checkScale(scale);
minorUnits = _rescale(
(amount * Decimal.ten.pow(amount.scale).toDecimal()).toBigInt(),
existingScale: amount.scale,
targetScale: scale,
);
}