FdcDecimal.fromNum constructor
Creates a decimal from a finite Dart number.
When scale is omitted, the scale is inferred from the number's decimal
text representation. Pass scale to normalize the value to a field-like
fixed scale.
Implementation
factory FdcDecimal.fromNum(num value, {int? scale}) {
final decimal = tryFromNum(value, scale: scale);
if (decimal == null) {
throw ArgumentError.value(value, 'value', 'Expected a finite number.');
}
return decimal;
}