Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Download the whole quran suwar and quran single surah #1194

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
6cd63ad
gitignore: update ignore files
YassinNouh21 Apr 30, 2024
2f20bef
pubspec: add `dart_mappable`, `json_annotation`, `dart_mappable_build…
YassinNouh21 Apr 30, 2024
7d49439
feat(model): `language`, `moshaf`, `reciter`,and `riwayat` models
YassinNouh21 Apr 30, 2024
35754c8
feat(model): add `surah` model
YassinNouh21 Apr 30, 2024
55801e7
feat: add exception class for quran feature
YassinNouh21 Apr 30, 2024
fd86337
feat(const): add `kQuranBaseUrl` and `kSurahBox`
YassinNouh21 Apr 30, 2024
9821e5e
feat(model): add hive caching helper in `SurahModel`
YassinNouh21 May 3, 2024
709d41c
feat(model): add `LanguageModel` for fetching model from remote
YassinNouh21 May 3, 2024
146e3e3
feat: register model in the main
YassinNouh21 May 3, 2024
a1f4234
feat: add language helper method
YassinNouh21 May 3, 2024
90a8d42
feat: adding `CannotFindSuwarByLanguageException` as exception for quran
YassinNouh21 May 3, 2024
5f12812
feat(data): add `QuranLocalDataSource` to handle caching and local st…
YassinNouh21 May 3, 2024
845ad0b
feat(data): add `QuranImpl` and `QuranRepository` to handle repository
YassinNouh21 May 3, 2024
2deebd5
feat(state_management): add notifier and state for handling the state…
YassinNouh21 May 3, 2024
17dbb2e
refactor(model): delete mistyped model (language_model)
YassinNouh21 May 4, 2024
740c6d2
feat: add listen to navigation in `mawaqitDrawer`
YassinNouh21 May 4, 2024
a7d5cfc
feat(ui): add displaying the ui of the surah list
YassinNouh21 May 4, 2024
067a50f
Merge branch 'main' into feat/quran/recite
YassinNouh21 May 11, 2024
7764e35
assets: add assets including icons and background
YassinNouh21 May 14, 2024
4f5d4df
assets: default_avatar, pause
YassinNouh21 May 16, 2024
4268a30
dependency: add `shimmer`, `rxdart`, `just_audio_background`. add the…
YassinNouh21 May 16, 2024
8031dae
feat: add paths in the resource
YassinNouh21 May 16, 2024
578507a
feat: add localization for the english
YassinNouh21 May 16, 2024
9a68540
feat: add theme for `quranBackground`
YassinNouh21 May 16, 2024
51e0c6e
feat: add QuranBackground widget.
YassinNouh21 May 16, 2024
bf1137a
feat: add theme for `quranBackground` and enhance recitation features
YassinNouh21 May 16, 2024
94af254
format
YassinNouh21 May 16, 2024
afc2dc9
Merge branch 'main' into feat/quran/recite
YassinNouh21 May 17, 2024
889804e
feat: enhance UI Responsiveness and Add SafeArea Widget
YassinNouh21 May 17, 2024
1b89c2a
format files
YassinNouh21 May 19, 2024
8b94976
feat: add localization and constant for reading feature
YassinNouh21 May 19, 2024
a31b49c
feat(quran): add reading screen and mode selection functionality
YassinNouh21 May 19, 2024
394df04
refactor: adjust the selection of the mode
YassinNouh21 May 19, 2024
c9d82fc
feat: adding the notifier and state for quran reading
YassinNouh21 May 24, 2024
51b396b
feat: Quran reading mode and update Quran download functionality
YassinNouh21 May 24, 2024
b9d0811
feat: add Quran reading functionality including `data_source`, `impl`…
YassinNouh21 May 26, 2024
a4e903e
feat: add constant for `saved_current_page`
YassinNouh21 May 26, 2024
c857af8
feat: add Quran reading last reading page state management and UI int…
YassinNouh21 May 26, 2024
2bdd5df
feat: switch between two modes reading and listening
YassinNouh21 May 26, 2024
d85fdc4
feat: improve Quran reading experience and page navigation
YassinNouh21 May 26, 2024
609b49b
remove tests
YassinNouh21 May 26, 2024
944714c
remove test `download_quran_data_source`
YassinNouh21 May 26, 2024
741a7f7
feat: enhance navigation and user experience for Quran modes
YassinNouh21 May 26, 2024
39b490a
fix: fix error when loading the reciters
YassinNouh21 May 26, 2024
4d2ca61
refactor: change the reading from right to left not from left to right
YassinNouh21 May 28, 2024
70bce35
refactor: change the icon button for switching between quran pages
YassinNouh21 May 28, 2024
49d08d5
refactor: change the button for switching between pages
YassinNouh21 May 28, 2024
ba33312
refactor: use more space between quran pages
YassinNouh21 May 28, 2024
120d531
refactor: remove the switch button in the choose reciter
YassinNouh21 May 28, 2024
14cb0e8
refactor: remove slide menu and the date
YassinNouh21 May 30, 2024
901bda9
refactor: remove unnecessary imports and `georgianDate`, `mosqueCount…
YassinNouh21 May 30, 2024
1294261
feat: add back button at the quran player
YassinNouh21 May 30, 2024
d3cd816
fix: adjust the place of the left and right skipper in the `quran_pla…
YassinNouh21 May 30, 2024
7f58ba6
fix: adjust the typo error in the moshuf type
YassinNouh21 May 31, 2024
226a01d
refactor: change the size of the icon and remove the background and a…
YassinNouh21 May 31, 2024
3b8be0c
feat: add `Page` string into the intl_en, add display the index of th…
YassinNouh21 May 31, 2024
5d11edd
feat: add choose the page of the quran
YassinNouh21 Jun 1, 2024
55ba6ba
feat: add dialog to choose the page from it
YassinNouh21 Jun 6, 2024
e99f0b5
refactor: remove the download in setting screen
YassinNouh21 Jun 6, 2024
410900c
feat: Optimize ReciteLocalDataSource for efficient data retrieval and…
YassinNouh21 Jun 7, 2024
0a2517e
feat: add constant for box name of `kQuranReciterFavoriteBox`
YassinNouh21 Jun 7, 2024
dc5d549
feat: add exceptions
YassinNouh21 Jun 7, 2024
be14682
feat: Implement Quran favorite feature `QuranFavoriteRepository`, `Qu…
YassinNouh21 Jun 7, 2024
550f141
feat: add QuranFavoriteNotifier and QuranFavoriteState for managing f…
YassinNouh21 Jun 7, 2024
a255781
feat: add ui needed in the reciter
YassinNouh21 Jun 7, 2024
60cd1e2
feat: add remove from reciter favorite list
YassinNouh21 Jun 8, 2024
de8b1a3
feat: add more padding in the choose reciter
YassinNouh21 Jun 8, 2024
063387c
feat: Enhance reciter saving into favorites
YassinNouh21 Jun 9, 2024
23079d9
feat: add text for indication for favorite reciters
YassinNouh21 Jun 9, 2024
f7fed5f
feat: add each ui for favorite button for each reciter card
YassinNouh21 Jun 9, 2024
4a5ece7
feat: Remove shade from Surah Card, add feature to remove bookmarks, …
YassinNouh21 Jun 9, 2024
981cbfb
feat: add sort for the reciter name alphabetically
YassinNouh21 Jun 9, 2024
5cd6285
feat: Add local and remote audio file handling
YassinNouh21 Jun 13, 2024
a1a8cd1
feat: add audio file download feature
YassinNouh21 Jun 13, 2024
54fc8bb
feat: add `playLocalAudio`, `downloadAndPlayAudio` in the `QuranAudio…
YassinNouh21 Jun 13, 2024
31ec9f5
feat: add Quran audio player functionality and offline support
YassinNouh21 Jun 29, 2024
fdd6e4d
feat: improve Quran player navigation and audio handling
YassinNouh21 Jun 29, 2024
61e76e8
feat: add download all the suwars
YassinNouh21 Jun 29, 2024
121298c
feat: introduce new `DownloadAudioQuranNotifier` and `DownloadAudioQu…
YassinNouh21 Jun 30, 2024
54f7738
fix: naming for the `getDownloadedSuwarByReciterAndRiwayah` to indica…
YassinNouh21 Jun 30, 2024
cc3a7ef
feat: implement batch download for all Surahs
YassinNouh21 Jun 30, 2024
3b554b5
feat: remove logs for memory overload
YassinNouh21 Jun 30, 2024
6831210
feat: implement batch download functionality with status updates
YassinNouh21 Jun 30, 2024
4329508
refactor: update the message
YassinNouh21 Jun 30, 2024
52da6a1
feat: add timeout. add message for connectivity
YassinNouh21 Jul 1, 2024
824fa17
feat: update the pubspec
YassinNouh21 Jul 2, 2024
68c4341
change the version of puspec for `codemagic`
YassinNouh21 Jul 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ emulator.sh
/android/mawaqit.jks
/android/key.properties
/android/app/release

# Files generated by Flutter
*.mapper.dart
*.g.dart
2 changes: 2 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ linter:
rules:
- cancel_subscriptions
- require_trailing_commas
- close_sinks
- always_use_package_imports
Binary file added assets/backgrounds/quran_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icon/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icon/love.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icon/pause.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icon/repeat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icon/shuffle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icon/skip_next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icon/skip_previous.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/quran/default_avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 73 additions & 31 deletions lib/const/resource.dart
Original file line number Diff line number Diff line change
@@ -1,99 +1,141 @@
/// Generate by [resource_generator](https://github.com/CaiJingLong/flutter_resource_generator) library.
/// Generate by [asset_generator](https://github.com/fluttercandies/flutter_asset_generator) library.
/// PLEASE DO NOT EDIT MANUALLY.
// ignore_for_file: constant_identifier_names
class R {
const R._();

/// ![preview](file://E:\Projects\android-tv\assets\animations\lottie\language.json)
static const String ASSETS_ANIMATIONS_LOTTIE_LANGUAGE_JSON = 'assets/animations/lottie/language.json';

/// ![preview](file://E:\Projects\android-tv\assets\animations\lottie\search.json)
static const String ASSETS_ANIMATIONS_LOTTIE_SEARCH_JSON = 'assets/animations/lottie/search.json';

/// ![preview](file://E:\Projects\android-tv\assets\animations\lottie\theme.json)
static const String ASSETS_ANIMATIONS_LOTTIE_SETTINGS_JSON = 'assets/animations/lottie/settings.json';

static const String ASSETS_ANIMATIONS_LOTTIE_THEME_JSON = 'assets/animations/lottie/theme.json';

/// ![preview](file://E:\Projects\android-tv\assets\animations\lottie\welcome.json)
static const String ASSETS_ANIMATIONS_LOTTIE_WELCOME_JSON = 'assets/animations/lottie/welcome.json';

/// ![preview](file://E:\Projects\android-tv\assets\animations\rive\mawaqit_logo_animation1.riv)
static const String ASSETS_ANIMATIONS_RIVE_MAWAQIT_LOGO_ANIMATION1_RIV =
'assets/animations/rive/mawaqit_logo_animation1.riv';

/// ![preview](file://E:\Projects\android-tv\assets\backgrounds\splash_screen_5.png)
static const String ASSETS_BACKGROUNDS_QURAN_BACKGROUND_PNG = 'assets/backgrounds/quran_background.png';

static const String ASSETS_BACKGROUNDS_SPLASH_SCREEN_5_PNG = 'assets/backgrounds/splash_screen_5.png';

/// ![preview](file://E:\Projects\android-tv\assets\cfg\configuration.json)
static const String ASSETS_CFG_CONFIGURATION_JSON = 'assets/cfg/configuration.json';

/// ![preview](file://E:\Projects\android-tv\assets\cfg\settings.json)
static const String ASSETS_CFG_SETTINGS_JSON = 'assets/cfg/settings.json';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\ar.png)
static const String ASSETS_ICON_DOWNLOAD_SVG = 'assets/icon/download.svg';

static const String ASSETS_ICON_LOVE_SVG = 'assets/icon/love.svg';

static const String ASSETS_ICON_PAUSE_SVG = 'assets/icon/pause.svg';

static const String ASSETS_ICON_REPEAT_SVG = 'assets/icon/repeat.svg';

static const String ASSETS_ICON_SHUFFLE_SVG = 'assets/icon/shuffle.svg';

static const String ASSETS_ICON_SKIP_NEXT_SVG = 'assets/icon/skip_next.svg';

static const String ASSETS_ICON_SKIP_PREVIOUS_SVG = 'assets/icon/skip_previous.svg';

static const String ASSETS_IMG_FLAG_AR_PNG = 'assets/img/flag/ar.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\ba.png)
static const String ASSETS_IMG_FLAG_BA_PNG = 'assets/img/flag/ba.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\bn.png)
static const String ASSETS_IMG_FLAG_BG_PNG = 'assets/img/flag/bg.png';

static const String ASSETS_IMG_FLAG_BN_PNG = 'assets/img/flag/bn.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\de.png)
static const String ASSETS_IMG_FLAG_CA_PNG = 'assets/img/flag/ca.png';

static const String ASSETS_IMG_FLAG_CS_PNG = 'assets/img/flag/cs.png';

static const String ASSETS_IMG_FLAG_DA_PNG = 'assets/img/flag/da.png';

static const String ASSETS_IMG_FLAG_DE_PNG = 'assets/img/flag/de.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\en.png)
static const String ASSETS_IMG_FLAG_EL_PNG = 'assets/img/flag/el.png';

static const String ASSETS_IMG_FLAG_EN_PNG = 'assets/img/flag/en.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\es.png)
static const String ASSETS_IMG_FLAG_ES_PNG = 'assets/img/flag/es.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\fr.png)
static const String ASSETS_IMG_FLAG_ET_PNG = 'assets/img/flag/et.png';

static const String ASSETS_IMG_FLAG_FI_PNG = 'assets/img/flag/fi.png';

static const String ASSETS_IMG_FLAG_FR_PNG = 'assets/img/flag/fr.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\hr.png)
static const String ASSETS_IMG_FLAG_HE_PNG = 'assets/img/flag/he.png';

static const String ASSETS_IMG_FLAG_HR_PNG = 'assets/img/flag/hr.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\it.png)
static const String ASSETS_IMG_FLAG_HU_PNG = 'assets/img/flag/hu.png';

static const String ASSETS_IMG_FLAG_ID_PNG = 'assets/img/flag/id.png';

static const String ASSETS_IMG_FLAG_IT_PNG = 'assets/img/flag/it.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\ml.png)
static const String ASSETS_IMG_FLAG_JA_PNG = 'assets/img/flag/ja.png';

static const String ASSETS_IMG_FLAG_KO_PNG = 'assets/img/flag/ko.png';

static const String ASSETS_IMG_FLAG_LT_PNG = 'assets/img/flag/lt.png';

static const String ASSETS_IMG_FLAG_LV_PNG = 'assets/img/flag/lv.png';

static const String ASSETS_IMG_FLAG_ML_PNG = 'assets/img/flag/ml.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\nl.png)
static const String ASSETS_IMG_FLAG_NL_PNG = 'assets/img/flag/nl.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\pt.png)
static const String ASSETS_IMG_FLAG_NO_PNG = 'assets/img/flag/no.png';

static const String ASSETS_IMG_FLAG_PL_PNG = 'assets/img/flag/pl.png';

static const String ASSETS_IMG_FLAG_PT_PNG = 'assets/img/flag/pt.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\sq.png)
static const String ASSETS_IMG_FLAG_RO_PNG = 'assets/img/flag/ro.png';

static const String ASSETS_IMG_FLAG_RU_PNG = 'assets/img/flag/ru.png';

static const String ASSETS_IMG_FLAG_SL_PNG = 'assets/img/flag/sl.png';

static const String ASSETS_IMG_FLAG_SQ_PNG = 'assets/img/flag/sq.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\ta.png)
static const String ASSETS_IMG_FLAG_SV_PNG = 'assets/img/flag/sv.png';

static const String ASSETS_IMG_FLAG_TA_PNG = 'assets/img/flag/ta.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\tr.png)
static const String ASSETS_IMG_FLAG_TR_PNG = 'assets/img/flag/tr.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\flag\ur.png)
static const String ASSETS_IMG_FLAG_UK_PNG = 'assets/img/flag/uk.png';

static const String ASSETS_IMG_FLAG_UR_PNG = 'assets/img/flag/ur.png';

/// ![preview](file://E:\Projects\android-tv\assets\img\icon_exit.png)
static const String ASSETS_IMG_FLAG_ZH_PNG = 'assets/img/flag/zh.png';

static const String ASSETS_IMG_ICON_EXIT_PNG = 'assets/img/icon_exit.png';

/// ![preview](file://E:\Projects\android-tv\assets\scripts\clean.js)
static const String ASSETS_IMG_QURAN_DEFAULT_AVATAR_PNG = 'assets/img/quran/default_avatar.png';

static const String ASSETS_SCRIPTS_CLEAN_JS = 'assets/scripts/clean.js';

/// ![preview](file://E:\Projects\android-tv\assets\svg\mawaqit-logo-text-light.svg)
static const String ASSETS_SVG_MAWAQIT_LOGO_TEXT_LIGHT_SVG = 'assets/svg/mawaqit-logo-text-light.svg';

/// ![preview](file://E:\Projects\android-tv\assets\svg\mawaqit_logo_light.svg)
static const String ASSETS_SVG_MAWAQIT_LOGO_LIGHT_SVG = 'assets/svg/mawaqit_logo_light.svg';

/// ![preview](file://E:\Projects\android-tv\assets\svg\no-phone.svg)
static const String ASSETS_SVG_NO_PHONE_SVG = 'assets/svg/no-phone.svg';

/// ![preview](file://E:\Projects\android-tv\assets\svg\no-wi-fi.svg)
static const String ASSETS_SVG_NO_WI_FI_SVG = 'assets/svg/no-wi-fi.svg';

static const String ASSETS_VOICES_ADHAN_ADHAN_MADINA_FAJR_MP3 = 'assets/voices/adhan/adhan-madina-fajr.mp3';

static const String ASSETS_VOICES_ADHAN_ADHAN_MADINA_MP3 = 'assets/voices/adhan/adhan-madina.mp3';

static const String ASSETS_VOICES_ADHAN_BIP_MP3 = 'assets/voices/adhan/bip.mp3';

static const String ASSETS_VOICES_DUAA_IFTAR_MP3 = 'assets/voices/duaa_iftar.mp3';

static const String ASSETS_VOICES_TAKBIR_AID_MP3 = 'assets/voices/takbir-aid.mp3';
}
43 changes: 42 additions & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,46 @@
"update": "Update",
"automaticUpdate": "Notify update",
"automaticUpdateDescription": "Enable notify update to receive the latest features and improvements",
"later": "Later"
"later": "Later",
"downloadQuran": "Download Quran",
"quran": "Quran",
"askDownloadQuran": "Do you want to download the Quran?",
"download": "Download",
"downloadingQuran": "Downloading Quran",
"extractingQuran": "Extracting Quran",
"updatedQuran": "Quran updated",
"quranLatestVersion": "Quran is up to date",
"quranUpdatedVersion": "Quran updated version is: {version}",
"quranIsUpdated": "Quran is updated",
"quranDownloaded": "Quran downloaded",
"quranIsAlreadyDownloaded": "Quran is already downloaded",
"chooseReciter": "Choose Reciter",
"reciteType": "Recite Type",
"readingMode": "I want to read",
"listeningMode": "I want to listen",
"quranReadingPage": "Page {leftPage} - {rightPage} / {totalPages}",
"@quranReadingPage": {
"description": "Placeholder text for displaying Quran reading page numbers",
"placeholders": {
"leftPage": {
"type": "int",
"example": "1"
},
"rightPage": {
"type": "int",
"example": "2"
},
"totalPages": {
"type": "int",
"example": "604"
}
}
},
"chooseQuranPage": "Choose the page",
"favoriteReciter": "Favorite Reciters",
"allReciters": "All Reciters",
"downloadAllSuwarSuccessfully": "The whole quran is downloaded",
"noSuwarDownload": "No new suwars to download",
"connectDownloadQuran":"Please connect to Internet to download",
"playInOnlineModeQuran": "Please connect to internet to play"
}
13 changes: 12 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import 'package:logger/logger.dart';
import 'package:mawaqit/i18n/AppLanguage.dart';
import 'package:mawaqit/i18n/l10n.dart';
import 'package:mawaqit/src/const/constants.dart';
import 'package:mawaqit/src/domain/model/quran/moshaf_model.dart';
import 'package:mawaqit/src/domain/model/quran/quran_favorite_reciter_favorite_model.dart';
import 'package:mawaqit/src/domain/model/quran/reciter_model.dart';
import 'package:mawaqit/src/domain/model/quran/surah_model.dart';
import 'package:mawaqit/src/enum/connectivity_status.dart';
import 'package:mawaqit/src/helpers/AnalyticsWrapper.dart';
import 'package:mawaqit/src/helpers/Api.dart';
Expand All @@ -23,6 +27,7 @@ import 'package:mawaqit/src/services/mosque_manager.dart';
import 'package:mawaqit/src/services/settings_manager.dart';
import 'package:mawaqit/src/services/theme_manager.dart';
import 'package:mawaqit/src/services/user_preferences_manager.dart';
import 'package:path_provider/path_provider.dart';
import 'package:provider/provider.dart';
import 'package:sizer/sizer.dart';

Expand All @@ -33,7 +38,13 @@ Future<void> main() async {
() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
await Hive.initFlutter();
final directory = await getApplicationDocumentsDirectory();
Hive.init(directory.path);
Hive.registerAdapter(SurahModelAdapter());
Hive.registerAdapter(ReciterModelAdapter());
Hive.registerAdapter(MoshafModelAdapter());
Hive.registerAdapter(QuranReciterFavoriteModelAdapter());
Hive.registerAdapter(SurahFavoriteModelAdapter());
runApp(
ProviderScope(
child: MyApp(),
Expand Down
Loading