Fixed.fromDecimal constructor
Fixed.fromDecimal(
- Decimal amount, {
- int scale = 2,
Implementation
Fixed.fromDecimal(Decimal amount, {this.scale = 2}) {
_checkScale(scale);
value = _rescale(
amount,
existingScale: amount.hasFinitePrecision ? amount.scale : null,
targetScale: scale,
);
}