PackageTrack
Sign in Get early access

fraction

A package that helps you work with fractions and mixed fractions.

5.0.5 24K downloads/mo #2021 most downloaded on pub.dev albertodev01/fraction

What this package is like to depend on

Last release 1 years ago

07 May 2025

Release timing varies

gaps range from 1 weeks to 12 months

Nearly every release is documented

notes for 28 of 28 stable releases

Nothing withdrawn

no release was ever pulled

6 years old

31 releases · first in 2020

0 releases in the last 12 months

see the full history below

Release timeline

31 releases · Apr 2020 to May 2025
2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 31
  1. 5.0.5 07 May 2025
    Release notes
    • Updated Dart SDK constraints to ^3.7.2
    • Dependencies update
    • Minor documentation fixes
    Open source →
  2. 5.0.4 12 Dec 2024
    Release notes
    • Updated Dart SDK constraints to ^3.6.0
    • Dependencies update
    • Mixed fractions now return just the whole part when the numerator is 0
    Open source →
  3. 5.0.3 04 Aug 2024
    Release notes
    • Updated Dart SDK constraints to ^3.4.0
    • Dependencies update
    • Minor documentation improvements
    Open source →
  4. 5.0.2 22 Aug 2023
    Release notes

    What's Changed

    Full Changelog: 5.0.1...5.0.2

    Open source →
    Release notes
    • Updated Dart SDK constraints to ^3.1.0
    • Dependencies update
    Open source →
  5. 5.0.1 03 Jul 2023
    Release notes

    What's Changed

    Full Changelog: 5.0.0...5.0.1

    Open source →
    Release notes
    • Dependencies update
    Open source →
  6. 5.0.0 11 May 2023
    Release notes

    What's Changed

    New Contributors

    Full Changelog: https://github.com/albertodev01/fraction/commits/5.0.0

    Open source →
    Release notes
    • BREAKING: Rational, Fraction and MixedFraction types have the base modifier.
    • Updated Dart SDK constraints to ^3.0.0
    • Improved documentation and added more linter rules
    • Dependencies update
    Open source →
  7. 4.1.4 30 Aug 2022
    Release notes
    • Increased pubspec description length to raise the score at pub.dev
    Open source →
  8. 4.1.3 30 Aug 2022
    Release notes
    • Updated Dart SDK constraints to ">=2.18.0 <3.0.0"
    • Added more inline documentation
    • Dependencies update
    Open source →
  9. 4.1.2 20 Jul 2022
    Release notes
    • Added the MixedFraction.fromDouble method
    • Dependencies update
    Open source →
  10. 4.1.1 24 May 2022
    Release notes
    • Added more linter rules
    • Dependencies updates
    Open source →
  11. 4.1.0 12 May 2022
    Release notes
    • Updated Dart SDK constraints to ">=2.17.0 <3.0.0"
    • CHANGELOG.md updates
    • Dependencies updates
    Open source →
  12. 4.0.1 07 Feb 2022
    Release notes
    • Fixed a typo in the CHANGELOG.md file
    Open source →
  13. 4.0.0 07 Feb 2022
    Release notes
    • BREAKING: the EgyptianFraction class is not public anymore, it's been hidden in the internals of the package. The reason is that an egyptian fraction is not a kind of fraction but it's a way of representing a fraction: the EgyptianFraction type may be misleading (and it should have been called EgyptianFractionConverter since the beginning). The migration is very easy:
    // Old code
    EgyptianFraction(
      fraction: Fraction(5, 8),
    ).compute(); // [1/2 + 1/8]
    
    EgyptianFraction.fromMixedFraction(
      mixedFraction: MixedFraction(2, 4, 5),
    ).compute(); // [1 + 1 + 1/2 + 1/4 + 1/20]
    
    // New code
    Fraction(5, 8).toEgyptianFraction(); // [1/2 + 1/8]
    MixedFraction(2, 4, 5).toEgyptianFraction(); // [1 + 1 + 1/2 + 1/4 + 1/20]
    
    • Added the Rational abstract supertype of Fraction and MixedFraction, which also adds the tryParse method:
    // If the string is valid, it either returns a 'Fraction' or a 'MixedFraction'
    Rational.tryParse('2/5');   // 2/5;
    Rational.tryParse('2 4/5'); // 2 4/5;
    
    // If the string is invalid, it returns 'null'
    Rational.tryParse('/5');    // null
    Rational.tryParse('');      // null
    
    • CHANGELOG.md updates
    • Dependencies updates
    Open source →
  14. 3.2.2 27 Jan 2022
    Release notes
    • BREAKING: removed EgyptianFraction.clearCache() and EgyptianFraction.cachingEnabled. Caching is now always enabled by default and the cache cannot be purged.
    • Increased Dart SDK constraints (>=2.14.0 <3.0.0)
    • Minor fixes in the example/ folder
    • Dependencies updates
    Open source →
  15. 3.2.1 30 Dec 2021
    Release notes
    • Added some more rules in analysis_options.yaml
    • Dependencies updates
    Open source →
  16. 3.2.0 27 Dec 2021
    Release notes
    • Added a small Dart CLI application in the example/ folder
    • Minor fixes on the MixedFraction type
    • Dependencies updates
    Open source →
  17. 3.1.1 20 Dec 2021
    Release notes
    • Added some more dart_code_metrics rules and minor README fixes
    • Code polish
    • Dependencies updates
    Open source →
  18. 3.1.0 10 Sep 2021
    Release notes
    • Added stricter linter rules with lints and dart_code_metrics packages
    • Dependencies updates
    Open source →
  19. 3.0.2 18 Aug 2021
    Release notes
    • Dependencies updates
    • Fixed formatting to increase pub score
    Open source →
  20. 3.0.1 17 Apr 2021
    Release notes
    • Added the toEgyptianFraction() method on Fraction and MixedFraction
    • Added a the new named constructor EgyptianFraction.fromMixedFraction()
    • Minor documentation fixes
    Open source →
  21. 3.0.0 16 Apr 2021
    Release notes
    • BREAKING: the extension method for Fraction on String now has bool get isFraction instead of bool isFraction()
    • BREAKING: the extension method for MixedFraction on String now has bool get isMixedFraction instead of bool isMixedFraction()
    • Added support for egyptian fractions
    • Added support for encoding/decoding unicode fraction glyphs
    • Added the percentage property on Fraction and MixedFraction to express the percentage represented by the fraction
    • Added the primeFactorization() method on Fraction to find which prime numbers multiply together to make the numerator and denominator
    Open source →
  22. 2.0.1 19 Mar 2021
    Release notes
    • Improved static analysis with a more elaborated analysis_options.yaml file
    • Dependencies versions update
    Open source →
  23. 2.0.0 03 Mar 2021
    Release notes
    • Migration to stable null safety
    • Dependencies versions update
    Open source →
  24. 2.0.0-nullsafety.2 01 Dec 2020 pre-release
    Release notes
    • Minor updates in the README.md file.
    • Minor fixes in the documentation
    • Added isProper and isImproper getters on Fraction
    Open source →
  25. 2.0.0-nullsafety.1 30 Nov 2020 pre-release
    Release notes
    • Minor updates in the README.md file.
    Open source →
  26. 2.0.0-nullsafety.0 30 Nov 2020 pre-release
    Release notes
    • Package migrated to null safety (Dart 2.12).
    • Minor bug fixes on Fraction.
    • Fixed various issues in the MixedFraction.
    • Added operators overloads for MixedFraction.
    • BREAKING CHANGE: Now Fraction and MixedFraction are immutable.
    • BREAKING CHANGE: Now MixedFraction accepts any kind of fractional value (even improper factions, which will be internally converted).
    Open source →
  27. 1.2.1 11 Jul 2020
    Release notes
    • Fixed some health suggestions.
    Open source →
  28. 1.2.0 11 Jul 2020
    Release notes
    • Removed Flutter dependencies.
    • Fixes on documentation and examples.
    • Now when calling toString() on a fraction whose denominator is 1, only the numerator is printed. For example, Fraction(3, 1).toString() returns 3 and not 3/1.
    Open source →
  29. 1.1.0 21 Jun 2020
    Release notes
    • Added support for operator [](int index).
    Open source →
  30. 1.0.1 06 Apr 2020
    Release notes
    • Fixed some health suggestions.
    • Added a few examples in the repository.
    Open source →
  31. 1.0.0 06 Apr 2020
    Release notes
    • Fraction and MixedFraction have been released.
    • added support to extension methods to create helpers for num and string.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive