Skip to content
pubscout

adhan

2.0.0+1, released 3 years ago by riajul.dev

Library for calculating Islamic prayer times in Dart

WASM-ready
$ flutter pub add adhan
Source repository

What it does

Provides high‑precision astronomical calculations for prayer times, supporting multiple calculation methods and time zones. It exposes a simple API to get today’s or custom date prayer times.

AI-written summary of version 2.0.0+1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need accurate prayer times for a Flutter or Dart app
  • You want to support multiple calculation methods and custom adjustments
  • You prefer a dependency‑free, lightweight library

Skip it when

  • You need a UI widget set for prayer times
  • You require network or storage features beyond calculation

Strengths

  • No external dependencies, low method overhead
  • Supports many calculation methods and custom adjustments
  • Fully documented and tested
  • Cross‑platform (Dart, Flutter, web, native)

Weaknesses

  • No UI components
  • Limited to prayer time calculations only

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

Add dependency to pubspec and import 'package:adhan/adhan.dart'; no special permissions needed

import 'package:adhan/adhan.dart';

final coords = Coordinates(23.9088, 89.1220);
final params = CalculationMethod.karachi.getParameters()..madhab = Madhab.hanafi;
final times = PrayerTimes.today(coords, params);
print(times.fajr);

Alternatives

Packages that do the same job and could replace adhan.

  • adhan_dart

    Calculate Islamic prayer times using precise astronomical formulas.

  • snippet_coder_utils

    Utility package providing form widgets, data table helpers, image picker and color utilities for Flutter.