QuranMetadata class

Provides metadata about the Quran — surah names, page lookups, bookmarks, juz mapping, sajda positions, hizb/rub markers, qira'at.

Call init once at startup. All other getters are synchronous.

Properties

hashCode int
The hash code for this object.
no setterinherited
hizbMarkers List<HizbMarker>
All 240 rub al-hizb markers.
no setter
isInitialized bool
no setter
qiraat List<Qiraa>
All 10 canonical qira'at.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sajdaPositions List<SajdaPosition>
All 15 sajda positions.
no setter
storage QuranStorage
Storage backend. Defaults to JsonFileQuranStorage. Set before calling init to use a custom implementation.
getter/setter pair
surahs List<SurahNameInfo>
All 114 surahs.
no setter

Methods

getBookmarks() Future<List<int>>
Returns saved bookmark pages (sorted).
getLastPage() Future<int>
hizbForPage(int page) int
Get the hizb number (1-60) for a given page.
hizbMarkersOnPage(int page) List<HizbMarker>
Get hizb markers on a specific page.
init() Future<void>
Initialize. Safe to call multiple times (no-op after first).
isBookmarked(int page) Future<bool>
Check if a page is bookmarked.
juzForPage(int page) int
Returns the juz number (1-30) for a given page.
markersForHizb(int hizb) List<HizbMarker>
Get markers for a specific hizb (1-60). Returns 4 rub markers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pageForJuz(int juz) int
Returns the starting page of a juz (1-based).
pageForSurah(int surahNumber) int
Returns the starting page of a surah (1-based).
qiraaById(String id) Qiraa?
Get a qira'a by id.
rubForPage(int page) int
Get the rub al-hizb quarter (1-240) for a given page.
sajdaAt(int surah, int ayah) SajdaPosition?
Check if a specific ayah is a sajda position.
sajdasOnPage(int page) List<SajdaPosition>
Get sajda positions on a specific page.
saveLastPage(int page) Future<void>
surahByNumber(int number) SurahNameInfo?
Surah info by number (1-based).
surahForPage(int page) SurahNameInfo?
Returns the SurahNameInfo for a given page.
surahNumberForPage(int page) int
Returns the surah number for a given page (1-based).
toggleBookmark(int page) Future<bool>
Toggle bookmark for a page. Returns true if added, false if removed.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance QuranMetadata
final