adhan_dart 2.0.1
adhan_dart: ^2.0.1 copied to clipboard
Library to calculate prayer times for muslims. Based on precise astronomical formula.
Changelog #
All notable changes to this project will be documented in this file.
2.0.1 — 2026-05-11 #
Changed #
- Dev dependency
timezoneupdated to ^0.11.0 (Dart ^3.10.0 for package consumers running tests or examples that load tzdata). - Tests and examples initialize the full IANA database via
package:timezone/data/latest_all.dartso zone names used in tests (e.g.Europe/Oslo,Asia/Kuala_Lumpur) remain available;latest.dartin timezone 0.11+ embeds a reduced zone set. - CI minimum matrix SDK set to 3.10.0 to match timezone 0.11.
- README: documenting
latest_allvslatest, and that local development/tests need Dart 3.10+ with current dev dependencies.
2.0.0 — 2026-05-10 #
Added #
- Configurable
RoundingonCalculationParameters;PolarCircleResolutionfor extreme latitudes;sunsetonPrayerTimes;Shafaqfor Moonsighting Committee Isha (where applicable). - Many calculation methods (e.g. Gulf, Russia, Jordan, Tunisia, Algeria, France UOIF, Portugal, Jafari, and others);
displayNameonPrayerandCalculationMethod;toStringonPrayerTimes,SunnahTimes, andCalculationParameters. Madhabas an enhanced enum withshadowLength;shadowLength(Madhab)kept for compatibility.- Coordinate range validation on
Coordinates; expanded tests; GitHub Actions CI;lints; changelog and README updates; pubspec metadata and.gitignoreimprovements.
Changed #
- Type safety (e.g.
Coordinatesinstead ofdynamicwhere appropriate); docs/TODO cleanup; dart formatting applied across sources.
Breaking changes #
PrayerTimes.currentPrayer/PrayerTimes.nextPrayer— The time argument is now an optional named parameter ({DateTime? date}) defaulting toDateTime.now(). Replace positional calls such ascurrentPrayer(dateTime)withcurrentPrayer(date: dateTime)(and likewise fornextPrayer). This is a compile-time break for existing call sites.CalculationMethodand other public enums — Many new calculation methods were added.switchstatements that are exhaustive over these enums must be updated to handle the new values or use a default branch.- Singapore preset rounding —
CalculationMethodParameters.singapore()now setsRounding.upfor minute rounding. Published times can differ by up to a minute at boundaries compared to earlier releases that always used implicit nearest-minute behavior for that preset. Coordinates— Assertions enforce latitude ∈ [−90, 90] and longitude ∈ [−180, 180]. Out-of-range values that previously propagated may fail in debug mode (asserts are omitted in some release builds depending on your compile flags).PolarCircleResolution— When set to anything other thanunresolved, polar-day/night edge cases use the new resolution logic and may produce different times than before for extreme latitudes.
Contributions in this release were driven largely by Mahmoud Hamdi (@mahmoodhamdi) via GitHub pull requests #17–#48 (stacked features, tests, docs, and tooling). Thank you for the extensive work on calculation methods, API polish, and quality improvements.
1.2.0 #
- Calculation method changes (full credit to MoathCodes), typing fixes.
1.1.2 #
- Explicit
method,fajrAngle,ishaAngleparameters forCalculationParameters. - Explicit
coordinates,date,calculationParametersparameters forPrayerTimes.
1.1.1 #
- Fixed documentation.
- Calculation parameters bug fix.
1.1.0 #
- Exposed
highLatitudeRule,madhab,adjustments,methodAdjustmentsonCalculationParameters. - Updated timezone package.
- New lint rules, fixed static methods naming convention.
- Turkey method renamed to Turkiye.
1.0.8 #
- Bug fix for UmmAlQura and Qatar calculation methods.
1.0.7 #
nextPrayer()andcurrentPrayer()no longer return null before Fajr/after Isha.- Added
ishaBeforeandfajrAfterprayer values.
1.0.6 #
- Fix for day of year calculation.
1.0.5 #
- Example added.
1.0.4 #
- Day of year native
DateTimeimplementation in DateUtils.
1.0.3 #
- Null safety migration.
1.0.2 #
- Minor import fix.
1.0.1 #
- Timezone package moved to dev dependencies.
1.0.0 #
- Initial release.