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
Releases
latest 31-
5.0.507 May 2025Release notes
Open source →- Updated Dart SDK constraints to
^3.7.2 - Dependencies update
- Minor documentation fixes
- Updated Dart SDK constraints to
-
5.0.412 Dec 2024Release notes
Open source →- Updated Dart SDK constraints to
^3.6.0 - Dependencies update
- Mixed fractions now return just the whole part when the numerator is 0
- Updated Dart SDK constraints to
-
5.0.304 Aug 2024Release notes
Open source →- Updated Dart SDK constraints to
^3.4.0 - Dependencies update
- Minor documentation improvements
- Updated Dart SDK constraints to
-
5.0.222 Aug 2023Release notes
Open source → -
5.0.103 Jul 2023Release notes
Open source → -
5.0.011 May 2023Release notes
Open source →What's Changed
- Added coverage support by @albertodev01 in #3
- Null safety migration by @albertodev01 in #2
- Null safety release by @albertodev01 in #4
- Minor fixes by @albertodev01 in #5
- Added support for encoding/decoding unicode fraction glyphs by @doppio in #8
- feat: Adding egyptian fractions and support for glyphs by @albertodev01 in #9
- chore: Documentation fixes and minor API update by @albertodev01 in #10
- chore: Added stricter linter rules by @albertodev01 in #11
- chore: Code polish and CI enhacements by @albertodev01 in #12
- chore: Fixed some bugs and added a new example by @albertodev01 in #13
- chore: Dependencies update and minor fixes by @albertodev01 in #14
- feat: Internal refactor and new additions by @albertodev01 in #16
- chore: Update dependencies and upgrate to Dart 2.17 by @albertodev01 in #17
- feat: Added new 'MixedFraction.fromDouble' constructor by @albertodev01 in #19
- chore: Dependencies updates and minor additions by @albertodev01 in #20
- fix: Increased pub score by @albertodev01 in #21
- feat: Support for Dart 3 by @albertodev01 in #23
New Contributors
- @albertodev01 made their first contribution in #3
- @doppio made their first contribution in #8
Full Changelog: https://github.com/albertodev01/fraction/commits/5.0.0
Release notes
Open source →- BREAKING:
Rational,FractionandMixedFractiontypes have thebasemodifier. - Updated Dart SDK constraints to
^3.0.0 - Improved documentation and added more linter rules
- Dependencies update
-
4.1.430 Aug 2022 -
4.1.330 Aug 2022Release notes
Open source →- Updated Dart SDK constraints to
">=2.18.0 <3.0.0" - Added more inline documentation
- Dependencies update
- Updated Dart SDK constraints to
-
4.1.220 Jul 2022 -
4.1.124 May 2022 -
4.1.012 May 2022Release notes
Open source →- Updated Dart SDK constraints to
">=2.17.0 <3.0.0" - CHANGELOG.md updates
- Dependencies updates
- Updated Dart SDK constraints to
-
4.0.107 Feb 2022 -
4.0.007 Feb 2022Release notes
Open source →- BREAKING: the
EgyptianFractionclass 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: theEgyptianFractiontype may be misleading (and it should have been calledEgyptianFractionConvertersince 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
Rationalabstract supertype ofFractionandMixedFraction, which also adds thetryParsemethod:
// 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
- BREAKING: the
-
3.2.227 Jan 2022Release notes
Open source →- BREAKING: removed
EgyptianFraction.clearCache()andEgyptianFraction.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
- BREAKING: removed
-
3.2.130 Dec 2021 -
3.2.027 Dec 2021Release notes
Open source →- Added a small Dart CLI application in the
example/folder - Minor fixes on the
MixedFractiontype - Dependencies updates
- Added a small Dart CLI application in the
-
3.1.120 Dec 2021Release notes
Open source →- Added some more
dart_code_metricsrules and minor README fixes - Code polish
- Dependencies updates
- Added some more
-
3.1.010 Sep 2021Release notes
Open source →- Added stricter linter rules with
lintsanddart_code_metricspackages - Dependencies updates
- Added stricter linter rules with
-
3.0.218 Aug 2021 -
3.0.117 Apr 2021Release notes
Open source →- Added the
toEgyptianFraction()method onFractionandMixedFraction - Added a the new named constructor
EgyptianFraction.fromMixedFraction() - Minor documentation fixes
- Added the
-
3.0.016 Apr 2021Release notes
Open source →- BREAKING: the extension method for
FractiononStringnow hasbool get isFractioninstead ofbool isFraction() - BREAKING: the extension method for
MixedFractiononStringnow hasbool get isMixedFractioninstead ofbool isMixedFraction() - Added support for egyptian fractions
- Added support for encoding/decoding unicode fraction glyphs
- Added the
percentageproperty onFractionandMixedFractionto express the percentage represented by the fraction - Added the
primeFactorization()method onFractionto find which prime numbers multiply together to make the numerator and denominator
- BREAKING: the extension method for
-
2.0.119 Mar 2021Release notes
Open source →- Improved static analysis with a more elaborated
analysis_options.yamlfile - Dependencies versions update
- Improved static analysis with a more elaborated
-
2.0.003 Mar 2021 -
2.0.0-nullsafety.201 Dec 2020 pre-releaseRelease notes
Open source →- Minor updates in the README.md file.
- Minor fixes in the documentation
- Added
isProperandisImpropergetters onFraction
-
2.0.0-nullsafety.130 Nov 2020 pre-release -
2.0.0-nullsafety.030 Nov 2020 pre-releaseRelease notes
Open source →- 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
FractionandMixedFractionare immutable. - BREAKING CHANGE: Now
MixedFractionaccepts any kind of fractional value (even improper factions, which will be internally converted).
-
1.2.111 Jul 2020 -
1.2.011 Jul 2020Release notes
Open source →- 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()returns3and not3/1.
-
1.1.021 Jun 2020 -
1.0.106 Apr 2020 -
1.0.006 Apr 2020Release notes
Open source →FractionandMixedFractionhave been released.- added support to extension methods to create helpers for
numandstring.