QuranCtrl class
- Inheritance
-
- Object
- GetLifeCycle
- DisposableInterface
- GetxController
- QuranCtrl
- Implemented types
- Available extensions
Constructors
- QuranCtrl.new({QuranRepository? quranRepository})
Properties
-
ayahs
→ RxList<
AyahModel> -
final
-
ayahsList
↔ RxList<
AyahModel> -
getter/setter pair
- baseScaleFactor ↔ RxDouble
-
getter/setter pair
-
currentPageAyahs
→ List<
AyahModel> -
Available on QuranCtrl, provided by the QuranGetters extension
Retrieves the list of Ayahs on the current page.no setter - 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
- 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
-
quranStops
↔ RxList<
int> -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleFactor ↔ RxDouble
-
getter/setter pair
-
selectedAyahsByUnequeNumber
→ RxList<
int> -
List of selected ayahs by their unique number
final
- state ↔ QuranState
-
getter/setter pair
-
staticPages
↔ RxList<
QuranPageModel> -
getter/setter pair
-
surahList
↔ RxList<
SurahModel> -
getter/setter pair
-
surahs
↔ RxList<
SurahModel> -
getter/setter pair
-
surahsList
↔ RxList<
SurahNamesModel> -
getter/setter pair
-
surahsStart
↔ RxList<
int> -
getter/setter pair
Methods
-
$configureLifeCycle(
) → void -
inherited
-
addListener(
GetStateUpdate listener) → Disposer -
Register a closure to be called when the object notifies its listeners.
inherited
-
addListenerId(
Object? key, GetStateUpdate listener) → Disposer -
inherited
-
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 byGetBuilder()
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> -
getAyahWithSajdaInPage(
int pageIndex, {bool? isSurah = false, int? surahNumber}) → AyahModel? -
Available on QuranCtrl, provided by the QuranGetters extension
Retrieves the Ayah with a Sajda (prostration) on the given page. -
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. -
getCurrentSurahByPage(
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 -
getSajdaInfoForPage(
List< AyahModel> pageAyahs) → bool -
Available on QuranCtrl, provided by the QuranGetters extension
Determines if there is a Sajda (prostration) on the given page of Ayahs. -
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. -
getSurahsByPage(
int pageNumber) → List< SurahModel> -
Available on QuranCtrl, provided by the QuranGetters extension
Retrieves a list of Surahs present on a specific 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(
{dynamic 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.
inherited
-
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
-
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 -
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 -
search(
String searchText) → List< AyahModel> -
searchSurah(
String searchText) → List< SurahModel> -
switchFontType(
{required int fontIndex}) → Future< void> -
Available on QuranCtrl, provided by the QuranGetters extension
تبديل نوع الخط وتحميله إذا لم يكن محملاً من قبل -
textScale(
dynamic widget1, dynamic widget2) → Widget -
toggleAyahSelection(
int ayahUnequeNumber) → void - Toggle the selection of an ayah by its unique number
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
[List< Object> ? ids, bool condition = true]) → void -
Rebuilds
GetBuilder
each time you callupdate()
; Can take a List ofids
, that will only update the matchingGetBuilder( id: )
,ids
can be reused amongGetBuilders
like group tags. The update will only notify the Widgets, ifcondition
is true.inherited -
updateTextScale(
ScaleUpdateDetails details) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited