numeric_utils 0.2.0 copy "numeric_utils: ^0.2.0" to clipboard
numeric_utils: ^0.2.0 copied to clipboard

Provides extensions and utility functions for working with numeric types in Dart, including Rational and BigInt.

0.2.0 - 2025-03-05 #

Added #

  • RationalParsing.fromString: A new utility method that parses strings into Rational objects, supporting the output of Rational.toString (e.g., fractions like "3/4", mixed numbers like "1 3/4") as well as formats parsable by Rational.parse (e.g., integers, decimals, scientific notation). Enables round-trip serialization for JSON and other formats.

0.1.1 - 2025-02-23 #

Fixed #

  • Downgraded intl to 0.19.0 due to Flutter pinning

0.1.0 - 2025-02-23 #

  • Initial version of numeric_utils.
  • Features:
    • Added RationalRoundingExtension with various rounding methods (rounded, toNearest, etc.).
      • Added RoundingMode enum.
    • Added BigIntRoundedDivisionExtension for rounded division of BigInts.
    • Added RationalFormattingExtension with toDecimalPlaces, toCurrency and toPercentage methods.
    • Added RationalCommonRoundingExtension with toDecimalPlace, toCents, toNearestHalf, toNearestThird, and toNearestQuarter methods.
    • Added BigIntMultipleOfExtension and IntMultipleOfExtension for isMultipleOf methods.
  • Constants:
    • Added RationalConstants with common rational values as well as IntConstants and BigIntConstants
0
likes
0
points
342
downloads

Publisher

unverified uploader

Weekly Downloads

Provides extensions and utility functions for working with numeric types in Dart, including Rational and BigInt.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

intl, rational

More

Packages that depend on numeric_utils