🚀 prayer_zone

A powerful and easy-to-use Flutter library that helps developers to fetch all locations for prayer with prayer method and Madhab of each one.


📌 Table of Contents

  • About
  • Features
  • Installation
  • Usage
  • API Reference
  • Example
  • Project Structure
  • License
  • Author

📖 About

prayer_zone is a reusable package built with Flutter that simplifies all locations for prayer. Which you can get the prayer method and Madhab of each one.

It is designed to be:

  • ⚡ Fast
  • 🎯 Easy to use
  • 🧩 Highly customizable
  • 📱 Cross-platform (Android, iOS, Web, Desktop, Linux, macOS)

✨ Features

  • ✔️ 17 prayer methods with coordinates and angels from https://www.salahtimes.com/
  • ✔️ 2 Madhab for Asr prayer calculation
  • ✔️ 182 supported countries
  • ✔️ Clean and modular architecture

📦 Installation

Add this to your pubspec.yaml:

dependencies:
  prayer_zone: ^0.0.6

Then run:

flutter pub get prayer_zone

🚀 Usage

Import the package:

import 'package:prayer_zone/prayer_zone.dart';

Basic Example

PrayerZone.supportedCountries;

🧩 API Reference

Enum PrayerCalculationMethod

  • mwl (Muslim World League)
  • isna (Islamic Society of North America (ISNA))
  • egyptian (Egyptian General Authority of Survey)
  • makkah (Umm Al-Qura University, Makkah)
  • karachi (University of Islamic Sciences, Karachi)
  • tehran (Institute of Geophysics, University of Tehran)
  • kuwait
  • qatar
  • singapore (Majlis Ugama Islam Singapura, Singapore)
  • french (Union Organization Islamic de France)
  • turkey (Diyanet Isleri Baskanligi Turkey)
  • russian (Spiritual Administration of Muslims of Russia)
  • dubai
  • jakim (Jabatan Kemajuan Islam Malaysia (JAKIM))
  • tunisian
  • algerian
  • kemenag (Kementerian Agama Republik Indonesia)

Enum PrayerMadhab

  • shafi
  • hanafi

PrayerZone.supportedCountries;

Returns List of all supported countries.


final countries = PrayerZone.supportedCountries;

for (final country in countries) {
print(country.name);
print(country.code);
print(country.prayerMethod);
print(country.prayerMadhab);
}

PrayerZone.supportedCountriesCount;

Returns int with count of supported countries.

PrayerZone.getCountry(String isoCode);

Returns Country with supported country details.

PrayerZone.calculationMethods;

Returns List of all prayer methods including details.

final methods = PrayerZone.calculationMethods;

for (final method in methods) {
print(method.fajrAngel);
print(method.maghribAngel);
print(method.ishaAngel);
print(method.maghribInterval);
print(method.ishaInterval);
}

PrayerZone.calculationMethodsCount;

Returns int with count of prayer methods.

PrayerZone.aboutCalculationMethod(PrayerMethod method);

Returns PrayerCalculationMethod with details about prayer method.


📂 Project Structure

lib/
 ├── prayer_zone.dart
 ├── src/
 │   ├── type.dart/
 │   ├── data/
 │       ├── calculation_methods.dart
 │       ├── prayer_areas.dart

📄 License

This project is licensed under the MIT License.


👨‍💻 Author

Aburas GitHub: https://github.com/ebrahimAburas/islamic

Libraries

prayer_zone