getRealQuranPageNumber method

int getRealQuranPageNumber(
  1. int surahPageIndex
)

الحصول على رقم الصفحة الحقيقي في القرآن الكريم Get the real page number in the Quran

Implementation

int getRealQuranPageNumber(int surahPageIndex) {
  if (surahPageIndex < 0 || surahPageIndex >= surahPages.length) {
    return surahAyahs.isNotEmpty ? surahAyahs.first.page : 1;
  }

  // بعد إعادة بناء surahPages على صفحات المصحف الحقيقية، pageNumber هو الرقم الحقيقي.
  return surahPages[surahPageIndex].pageNumber;
}