decimalFixedPoint function

DecimalFixedPoint Function(String value, [FixedPointRoundingMode rounding]) decimalFixedPoint(
  1. FixedPointSignedness signedness,
  2. int totalBits,
  3. int decimals
)

Returns a factory that parses decimal strings into DecimalFixedPoint values.

Implementation

DecimalFixedPoint Function(String value, [FixedPointRoundingMode rounding])
decimalFixedPoint(
  FixedPointSignedness signedness,
  int totalBits,
  int decimals,
) {
  _assertValidShape(decimals, totalBits);
  return (value, [rounding = FixedPointRoundingMode.strict]) =>
      DecimalFixedPoint.parse(
        value,
        decimals: decimals,
        rounding: rounding,
        signedness: signedness,
        totalBits: totalBits,
      );
}