Skip to content

"فَاذْكُرُونِي أَذْكُرْكُمْ" is a comprehensive Flutter-based application designed to enhance the spiritual experience of users by providing features such as prayer times, azkar, and a user-friendly interface. With a focus on usability and aesthetics, Azkary integrates customizable themes and notification settings to offer a personalized experience

License

Notifications You must be signed in to change notification settings

mohamedmagdy2301/azkary_app

Repository files navigation

"وَقُلْ رَبِّ زِدْنِي عِلْمًا"


Typing SVG

Flutter Version License: MIT

Azkary is a comprehensive Flutter-based application designed to enhance the spiritual experience of users by providing features such as prayer times, azkar, and a user-friendly interface. With a focus on usability and aesthetics, Azkary integrates customizable themes and notification settings to offer a personalized experience for all users.


Table of Contents

Features

  • User Authentication: Secure login and registration to manage user accounts.
  • Prayer Times: Display accurate prayer times based on the user's location.
  • Azkar Access: Quick access to daily prayers and the ability to manage reminders.
  • Customizable Themes: Light and dark themes to enhance user experience.
  • Local Storage: Persistent storage of user preferences using Shared Preferences.
  • Notification System: Utilize Awesome Notifications for timely reminders and alerts.

Getting Started

To run the Azkary app locally, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/your-username/azkary_app.git
  2. Navigate to the Project Directory:

    cd azkary_app
  3. Install Required Dependencies:

    flutter pub get
  4. Run the Application:

    flutter run

Installation

Ensure you have the Flutter SDK installed on your machine, along with a compatible IDE (such as Android Studio or Visual Studio Code). Follow the installation guide provided by Flutter for a comprehensive setup.

Usage

Upon launching the application, users will find an intuitive interface with a bottom navigation bar for seamless navigation among different sections:

  • Home Screen: View prayer times and relevant religious information.
  • Azkar Screen: Access daily prayers and manage notification settings.
  • Sabha Screen: Keep track of tasbeeh counters.
  • Settings Screen: Customize themes and configure application settings.

Setup Awesome Notifications

To set up Awesome Notifications in your Flutter project, follow these steps:

  1. Add Dependency: Open your pubspec.yaml file and add the Awesome Notifications package:

    dependencies:
      awesome_notifications: ^0.0.0  # Replace with the latest version
  2. Initialize Notifications: Ensure you initialize Awesome Notifications in your main.dart file:

    void main() async {
      WidgetsFlutterBinding.ensureInitialized();
      await AwesomeNotifications().initialize(
        'resourceKey',
        [
          NotificationChannel(
            channelKey: 'basic_channel',
            channelName: 'Basic notifications',
            channelDescription: 'Notification channel for basic tests',
            defaultColor: Color(0xFF9D50b6),
            ledColor: Colors.white,
          )
        ],
      );
      runApp(MyApp());
    }
  3. Request Permissions: Ensure you request the necessary permissions for notifications:

    AwesomeNotifications().createNotification(
      content: NotificationContent(
        channelKey: 'basic_channel',
        title: 'Hello Awesome Notifications!',
        body: 'This is a notification example.',
      ),
    );
  4. Use Notifications: Utilize the notification manager to send reminders for azkar and prayer times.

API for Prayer Times

To fetch prayer times from an external API, follow these steps:

  1. Add HTTP Package: Add the HTTP package to your pubspec.yaml file:

    dependencies:
      http: ^0.13.3  # Replace with the latest version
  2. API Implementation: Create a service class to handle API calls. Below is an example of fetching prayer times:

    import 'package:http/http.dart' as http;
    import 'dart:convert';
    
    class PrayerTimeService {
      static const String apiUrl = 'https://api.aladhan.com/v1/timings';
    
      Future<Map<String, dynamic>> fetchPrayerTimes(double latitude, double longitude) async {
        final response = await http.get(Uri.parse('$apiUrl?latitude=$latitude&longitude=$longitude'));
        
        if (response.statusCode == 200) {
          return json.decode(response.body);
        } else {
          throw Exception('Failed to load prayer times');
        }
      }
    }
  3. Use the Service: Call this service in your PrayerTimesCubit or wherever you handle state management to retrieve and display prayer times.

Theming Mode

The Azkary app includes a theming mode that allows users to switch between light and dark themes. The implementation utilizes the ThemeCubit class for managing theme states.

Implementation Steps:

  1. ThemeCubit Class: The ThemeCubit manages the theme mode using the BLoC pattern. It saves the user's theme preference using Shared Preferences.

    import 'package:azkary_app/core/local_storage/shared_preferences_manager.dart';
    import 'package:flutter/material.dart';
    import 'package:flutter_bloc/flutter_bloc.dart';
    
    enum AppTheme { light, dark }
    
    class ThemeCubit extends Cubit<ThemeMode> {
      static const String _themeKey = "theme_mode";
    
      ThemeCubit() : super(ThemeMode.light);
    
      Future<void> loadTheme() async {
        final themeIndex = await SharedPreferencesManager.getData(key: _themeKey);
        if (themeIndex != null) {
          emit(ThemeMode.values[themeIndex]);
        } else {
          emit(ThemeMode.light);
        }
      }
    
      Future<void> toggleTheme(AppTheme theme) async {
        if (theme == AppTheme.dark) {
          emit(ThemeMode.dark);
          await SharedPreferencesManager.setData(
            key: _themeKey,
            value: ThemeMode.dark.index,
          );
        } else {
          emit(ThemeMode.light);
          await SharedPreferencesManager.setData(
            key: _themeKey,
            value: ThemeMode.light.index,
          );
        }
      }
    }
  2. Load and Toggle Theme: Integrate the loadTheme and toggleTheme methods in your settings screen to allow users to switch themes.

  3. Update UI: Use the BlocBuilder to rebuild the UI based on the current theme mode.

Folder Structure

The project is organized as follows:

azkary_app/
├── lib/
│   ├── core/
│   │   ├── local_storage/
│   │   ├── notification_helper/
│   │   └── theming/
│   ├── features/
│   │   ├── azkar/
│   │   ├── home/
│   │   ├── sabha/
│   │   └── settings/
│   └── main.dart
└── assets/

Contributing

Contributions are highly encouraged! If you would like to contribute to فَاذْكُرُونِي أَذْكُرْكُمْ, please follow these steps:

  1. Fork the Repository.
  2. Create a New Branch:
    git checkout -b feature/YourFeature
  3. Commit Your Changes:
    git commit -m "Add your message"
  4. Push to the Branch:
    git push origin feature/YourFeature
  5. Open a Pull Request.

Congratulations

You’ve successfully integrated "فَاذْكُرُونِي أَذْكُرْكُمْ" App into your Flutter app! For more advanced features and customization options.

If you found this guide helpful, don’t forget to ⭐ star this repository on GitHub to show your support!

Thank you for reading!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For any questions or inquiries, feel free to reach out:

About

"فَاذْكُرُونِي أَذْكُرْكُمْ" is a comprehensive Flutter-based application designed to enhance the spiritual experience of users by providing features such as prayer times, azkar, and a user-friendly interface. With a focus on usability and aesthetics, Azkary integrates customizable themes and notification settings to offer a personalized experience

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published