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

Recovery recite #1196

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 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
a2a0b6d
fix dpad focus reciter & recite type list
ghassenbenzahra123 Jun 21, 2024
67f92be
fix onselect recitertype with dpad
ghassenbenzahra123 Jun 22, 2024
bdec9f5
fix select surah with remote controller
ghassenbenzahra123 Jun 22, 2024
1243156
Merge branch 'feat/quran/quran_main' into feat/quran/recite
YassinNouh21 Jul 4, 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
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';
}
4 changes: 3 additions & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -211,5 +211,7 @@
"quranUpdatedVersion": "Quran updated version is: {version}",
"quranIsUpdated": "Quran is updated",
"quranDownloaded": "Quran downloaded",
"quranIsAlreadyDownloaded": "Quran is already downloaded"
"quranIsAlreadyDownloaded": "Quran is already downloaded",
"chooseReciter": "Choose Reciter",
"reciteType": "Recite Type"
}
10 changes: 9 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ 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/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 +26,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 +37,11 @@ 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());
runApp(
ProviderScope(
child: MyApp(),
Expand Down
3 changes: 3 additions & 0 deletions lib/src/const/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ abstract class MosqueManagerConstant {
abstract class QuranConstant {
static const String kQuranVersionLink = "'https://mawaqit.github.io/mawaqit-announcements/public/quran/config.json'";
static const String kQuranLocalVersion = 'quran_local_version';
static const String kQuranBaseUrl = 'https://mp3quran.net/api/v3/';
static const String kSurahBox = 'surah_box';
static const String kReciterBox = 'reciter_box';
}
Loading