mirror of
https://github.com/acamarata/pray-calc-dart.git
synced 2026-06-30 19:04:25 +00:00
1.1 KiB
1.1 KiB
pray_calc_dart
Islamic prayer times for Dart and Flutter. Calculates Fajr, Dhuhr, Asr, Maghrib, Isha, midnight, and Qiyam for any date and location. Implements the MCW seasonal model and Dynamic Prayer Calculation (DPC) algorithm. Depends on nrel_spa for solar positioning.
Install
dependencies:
pray_calc_dart: ^1.0.0
import 'package:pray_calc_dart/pray_calc_dart.dart';
final times = getTimes(
DateTime.utc(2024, 3, 15),
21.3891, // Makkah latitude
39.8579, // longitude
3.0, // UTC offset (AST)
);
print('Fajr: ${times.fajr.toStringAsFixed(4)} h');
print('Dhuhr: ${times.dhuhr.toStringAsFixed(4)} h');
print('Maghrib: ${times.maghrib.toStringAsFixed(4)} h');
print('Isha: ${times.isha.toStringAsFixed(4)} h');
Contents
- Quickstart Guide — install, first call, config options
- Advanced Usage — madhab, custom angles, seasonal model
- API Reference — full function and type reference
- Examples — real-world snippets
- Contributing