curo 3.0.2
curo: ^3.0.2 copied to clipboard
Powerful, modern Dart library for precise instalment credit calculations - from simple loans to advanced amortisation schedules.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
3.0.2 - 2026-01-26 #
Fixed #
- Added missing tolerance argument to solve method signatures
- Added missing changelog entry to doc/site changelog summary
3.0.1 - 2026-01-22 #
Fixed #
- Corrected first draw-down date detection when solving for an unknown advance amount (previously skipped due to placeholder 0.0 value).
- Improved discount factor operand logging: now correctly labels time fraction as
t(e.g., "t = 31/360 = 0.08611111") instead offfor Standard formula, aligning notation with US Appendix J convention.
Changed #
- Removed redundant
isChargefield fromCashFlowrecord (superseded byCashFlowType.type); updated all references accordingly.
3.0.0 - 2026-01-20 #
Breaking Changes & Complete Rewrite #
- Modern ground-up rewrite of the entire package, aligning design, behaviour, and accuracy with the sister project
curo-python. - Adopted modern Dart conventions: null-safety, sealed classes, records, enhanced enums, and idiomatic patterns.
- Flattened API structure: replaced deep OOP inheritance with a cleaner, more Pythonic composition style while retaining full type-safety.
- Redesigned core types:
- Introduced immutable
Serieshierarchy (SeriesAdvance,SeriesPayment,SeriesCharge) for defining cash flow series. - Replaced mutable cash flow objects with lightweight immutable
CashFlowrecords. - Extracted internal helpers for better testability.
- Introduced immutable
- Asynchronous solving:
solveRateandsolveValuenow returnFuture<double>(consistent with modern Dart expectations and the original 1.1.0 behaviour). - Simplified precision handling: single
precisionparameter onCalculator(0–4 decimal places). - All public APIs updated — existing code from ≤2.x will require migration.
Added #
- Built-in pretty-printed amortisation and APR proof schedules via
ScheduleRow.prettyPrint. - Comprehensive day count convention coverage unchanged but now with cleaner implementation and better documentation.
- Greatly expanded internal test coverage.
Removed #
- Legacy mutable cash flow classes and deep inheritance chains.
- Old synchronous solve methods.
This major version represents a transformative modernisation while preserving (and in many cases improving) numerical accuracy and regulatory compliance.
2.4.3 - 2025-12-14 #
2.4.2 - 2025-12-12 #
Enhancements #
- Improved cash flow sorting to consistently order same-date flows: advances → payments → charges.
- Added
==,hashCode, andcopyWithtoDayCountFactor.
2.4.1 - 2025-12-08 #
Enhancements #
- Strengthened root solver with bisection fallback for Newton-Raphson, improving reliability on long-term loans and edge cases.
- Expanded end-to-end tests for extreme scenarios.
Fixed #
- Profile builder now correctly honours user-provided start dates in arrears mode.
- Restricted
UKConcAppto validDayCountTimePeriodoptions.
2.4.0 #
Added #
- Implemented US Appendix J day count convention (Regulation Z) with full unit-period and leap year support.
- Extended
DayCountFactorto two-component model (principalFactor+fractionalAdjustment).
Breaking #
- Renamed
DayCountFactor.factor→principalFactor.
Enhancements #
- Improved
DayCountFactorstring formatting for complex conventions. - Added comprehensive tests validated against FFIEC APR calculator.
2.3.0 #
Added #
- Unified UK CONC App 1.1 and 1.2 into single
UKConcAppclass withisSecuredOnLandtoggle.
2.2.0 #
Added #
- Implemented UK CONC App 1.1 (secured on land) and UK CONC App 1.2 (unsecured) conventions.
2.1.1 #
Enhancements #
- Improved
DayCountFactor.toString()andtoFoldedString()for long formula rendering.
2.1.0 #
2.0.0 #
- Updated to Dart SDK ≥3.0.0.
- Dependency refresh and housekeeping.
1.0.0 #
- Initial release.