QuranCtrl class

Inheritance
  • Object
  • GetLifeCycle
  • DisposableInterface
  • GetxController
  • QuranCtrl
Implemented types
Available extensions

Constructors

QuranCtrl.new({QuranRepository? quranRepository})

Properties

ayahs List<AyahModel>
final
baseScaleFactor ↔ RxDouble
getter/setter pair
currentPageAyahs List<AyahModel>

Available on QuranCtrl, provided by the QuranGetters extension

Determines if there is a Sajda (prostration) on the given page of Ayahs.
no setter
externallyHighlightedAyahs → RxList<int>
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
no setterinherited
initialized bool
Checks whether the controller has already been initialized.
no setterinherited
initialPage int?
getter/setter pair
isAyahSelected bool
getter/setter pair
isClosed bool
Checks whether the controller has already been closed.
no setterinherited
isDownloadedFonts → RxBool

Available on QuranCtrl, provided by the QuranGetters extension

-------- Getter ----------
no setter
isDownloadFonts bool

Available on QuranCtrl, provided by the QuranGetters extension

Checks if the fonts are downloaded locally.
no setter
isLoading → RxBool
final
isMultiSelectMode → RxBool
final
isPreparingDownloadFonts bool

Available on QuranCtrl, provided by the QuranGetters extension

no setter
isShowControl ↔ RxBool
getter/setter pair
lastPage int
getter/setter pair
listeners int
no setterinherited
onDelete → InternalFinalCallback<void>
Internal callback that starts the cycle of this controller.
finalinherited
onStart → InternalFinalCallback<void>
Called at the exact moment the widget is allocated in memory. It uses an internal "callable" type, to avoid any @overrides in subclases. This method should be internal and is required to define the lifetime cycle of the subclass.
finalinherited
quranPagesController PageController
getter/setter pair
quranStops ↔ RxList<int>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleFactor ↔ RxDouble
getter/setter pair
searchResultAyahs → RxList<AyahModel>
final
searchResultSurahs → RxList<SurahModel>
final
selectedAyahsByUnequeNumber → RxList<int>
List of selected ayahs by their unique number
final
state QuranState
getter/setter pair
staticPages ↔ RxList<QuranPageModel>
getter/setter pair
surahs List<SurahModel>
final
surahsList ↔ RxList<SurahNamesModel>
getter/setter pair
surahsStart ↔ RxList<int>
getter/setter pair

Methods

$configureLifeCycle() → void
inherited
addExternalHighlight(int ayahUQNumber) → void
addListener(GetStateUpdate listener) → Disposer
Register a closure to be called when the object notifies its listeners.
inherited
addListenerId(Object? key, GetStateUpdate listener) → Disposer
inherited
clearExternalHighlights() → void
clearSelection() → void
deleteFonts() Future<void>

Available on QuranCtrl, provided by the FontsExtension extension

Deletes the font at the specified index.
dispose() → void
inherited
disposeId(Object id) → void
To dispose an id from future updates(), this ids are registered by GetBuilder() or similar, so is a way to unlink the state change with the Widget from the Controller.
inherited
downloadAllFontsZipFile(int fontIndex) Future<void>

Available on QuranCtrl, provided by the FontsExtension extension

Downloads a zip file containing all fonts for the specified font index.
fetchSurahs() Future<void>
fontsDownloadWidget(BuildContext context, {DownloadFontsDialogStyle? downloadFontsDialogStyle, String? languageCode, bool isDark = false, bool? isFontsLocal = false}) Widget

Available on QuranCtrl, provided by the FontsDownloadWidgetExtension extension

A widget that displays the fonts download option.
getAyahsByPage(int page) List<AyahModel>
getAyahUnqNumberByPageAndIndex(int page, int index) int

Available on QuranCtrl, provided by the QuranGetters extension

Retrieves the unique Ayah number for a specific Ayah on a given page.
getAyahUnqNumberBySurahAndAyahNumber(int surahNumber, int ayahNumber) int

Available on QuranCtrl, provided by the QuranGetters extension

Retrieves the unique Ayah number for a specific Ayah given its Surah and Ayah numbers.
getAyahUQBySurahAndAyah(int surahNumber, int ayahNumber) int?
تحويل (رقم السورة، رقم الآية) إلى الرقم الفريد للآية
getAyahUQsForPagesByAyahNumbers({required int startPage, required int endPage, required List<int> ayahNumbers}) List<int>
إرجاع أرقام UQ لكل الآيات ذات أرقام ayahNumber المحددة داخل نطاق صفحات
getAyahUQsForSurahAyahRange({required int startSurah, required int startAyah, required int endSurah, required int endAyah}) List<int>
إرجاع أرقام UQ لكل الآيات ضمن نطاق عبر السور، مثل 2:15-3:25 (شامل)
getCurrentJuzNumber(int juzNum) bool

Available on QuranCtrl, provided by the QuranGetters extension

Checks if the current Juz number matches the specified Juz number.
getCurrentPageAyahsSeparatedForBasmalah(int pageIndex) List<List<AyahModel>>

Available on QuranCtrl, provided by the QuranGetters extension

Returns a list of lists of AyahModel, where each sublist contains Ayahs that are separated by a Basmalah, for the given page index.
getCurrentSurahByPageNumber(int pageNumber) SurahModel

Available on QuranCtrl, provided by the QuranGetters extension

Retrieves the current Surah data for a given page number.
getCurrentSurahNumber(int surahNum) bool

Available on QuranCtrl, provided by the QuranGetters extension

Checks if the current Surah number matches the specified Surah number.
getHizbQuarterDisplayByPage(int pageNumber) String

Available on QuranCtrl, provided by the QuranGetters extension

Retrieves the display string for the Hizb quarter of the given page number.
getJuzByPage(int page) AyahModel

Available on QuranCtrl, provided by the QuranGetters extension

Retrieves the Juz data for a given page number.
getPageAyahsByIndex(int pageIndex) List<AyahModel>

Available on QuranCtrl, provided by the QuranGetters extension

Retrieves a list of AyahModel for a specific page index.
getPageController(BuildContext context) PageController
getPageNumberByAyahAndSurahNumber(int ayahNumber, int surahNumber) int

Available on QuranCtrl, provided by the QuranGetters extension

getPageNumberByAyahNumber(int ayahNumber) int

Available on QuranCtrl, provided by the QuranGetters extension

get page number by ayah number
getPageNumberByAyahUqNumber(int ayahUnequeNumber) int

Available on QuranCtrl, provided by the QuranGetters extension

get page number by ayah unique number
getSingleAyahByAyahAndSurahNumber(int ayahNumber, int surahNumber) AyahModel

Available on QuranCtrl, provided by the QuranGetters extension

getSurahDataByAyah(AyahModel ayah) SurahModel

Available on QuranCtrl, provided by the QuranGetters extension

Retrieves the Surah data for a given Ayah.
getSurahDataByAyahUQ(int ayah) SurahModel

Available on QuranCtrl, provided by the QuranGetters extension

Retrieves the Surah data for a given unique Ayah number.
getSurahNumberFromPage(int pageNumber) int

Available on QuranCtrl, provided by the QuranGetters extension

will return the surah number of the first ayahs.. even if the page contains another surah.
getSurahsByPageNumber(int pageNumber) List<SurahModel>

Available on QuranCtrl, provided by the QuranGetters extension

Retrieves a list of Surahs present on a specific page.
isThereAnySajdaInPage(int pageIndex) bool

Available on QuranCtrl, provided by the QuranGetters extension

Retrieves the Ayah with a Sajda (prostration) on the given page.
jumpToPage(int page) → void
loadFont(int pageIndex, {bool isFontsLocal = false}) Future<void>

Available on QuranCtrl, provided by the FontsExtension extension

Loads the font for the specified page index.
loadFontFromZip(int pageIndex) Future<void>

Available on QuranCtrl, provided by the FontsExtension extension

Loads a font from a ZIP file for the specified page index.
loadFontsQuran() Future<void>
-------- Methods ----------
loadQuran({int quranPages = QuranRepository.hafsPagesNumber}) Future<void>
normalizeText(String text) String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyChildrens() → void
inherited
onClose() → void
Called before onDelete method. onClose might be used to dispose resources used by the controller. Like closing events, or streams before the controller is destroyed. Or dispose objects that can potentially create some memory leaks, like TextEditingControllers, AnimationControllers. Might be useful as well to persist some data on disk.
override
onInit() → void
Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.
override
onReady() → void
Called 1 frame after onInit(). It is the perfect place to enter navigation events, like snackbar, dialogs, or a new route, or async request.
inherited
parseSurahAyahRangeString(String input) → (int, int, int, int)?
يحلل نص نطاق على شكل "2:15-3:25" إلى (startSurah,startAyah,endSurah,endAyah) يدعم الأرقام العربية والإنجليزية والمسافات.
prepareFonts(int pageIndex, {bool isFontsLocal = false}) Future<void>

Available on QuranCtrl, provided by the FontsExtension extension

Prepares fonts for the specified page index and adjacent pages.
refresh() → void
inherited
refreshGroup(Object id) → void
inherited
removeDiacriticsQuran(String input) String
removeExternalHighlight(int ayahUQNumber) → void
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies.
inherited
removeListenerId(Object id, VoidCallback listener) → void
inherited
saveLastPage(int lastPage) → void
searchSurah(String searchText) List<SurahModel>
setExternalHighlights(List<int> ayahUQNumbers) → void
setMultiSelectMode(bool enabled) → void
showControlToggle() → void

Available on QuranCtrl, provided by the QuranGetters extension

switchFontType({required int fontIndex}) Future<void>

Available on QuranCtrl, provided by the QuranGetters extension

تبديل نوع الخط وتحميله إذا لم يكن محملاً من قبل
textScale(dynamic widget1, dynamic widget2) Widget
toggleAyahSelection(int ayahUnequeNumber, {bool forceAddition = false}) → void
Toggle the selection of an ayah by its unique number
toggleAyahSelectionMulti(int ayahUniqueNumber) → void
إضافة/إزالة آية من التحديد بدون مسح بقية التحديد (للوضع المتعدد)
toString() String
A string representation of this object.
inherited
update([List<Object>? ids, bool condition = true]) → void
Rebuilds GetBuilder each time you call update(); Can take a List of ids, that will only update the matching GetBuilder( id: ), ids can be reused among GetBuilders like group tags. The update will only notify the Widgets, if condition is true.
inherited
updateTextScale(ScaleUpdateDetails details) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance QuranCtrl
no setter