towFirstSurahs method

Widget towFirstSurahs(
  1. BuildContext context,
  2. bool isFirstPageInFirstOrSecondSurah,
  3. QuranPageModel surahPage,
  4. Size deviceSize,
  5. SurahCtrl surahCtrl,
  6. int pageIndex,
)

بناء محتوى الصفحة للسورة الأولى والثانية Build page content for first and second surah

Implementation

Widget towFirstSurahs(
  BuildContext context,
  bool isFirstPageInFirstOrSecondSurah,
  QuranPageModel surahPage,
  Size deviceSize,
  SurahCtrl surahCtrl,
  int pageIndex,
) {
  final isLandscape =
      MediaQuery.of(context).orientation == Orientation.landscape;
  final currentPage = surahCtrl.getRealQuranPageNumber(pageIndex);
  return AllQuranWidget(
      pageIndex: currentPage - 1,
      languageCode: languageCode,
      juzName: juzName,
      sajdaName: sajdaName,
      isRight: pageIndex.isEven ? true : false,
      topTitleChild: topTitleChild,
      surahName: surahCtrl.getSurahName(),
      isSurah: true,
      child: Platform.isAndroid || Platform.isIOS
          ? isLandscape
              ? SingleChildScrollView(
                  child: _firstTwoSurahs(
                      context,
                      isFirstPageInFirstOrSecondSurah,
                      surahPage,
                      deviceSize,
                      surahCtrl,
                      pageIndex,
                      currentPage - 1))
              : _firstTwoSurahs(
                  context,
                  isFirstPageInFirstOrSecondSurah,
                  surahPage,
                  deviceSize,
                  surahCtrl,
                  pageIndex,
                  currentPage - 1)
          : _firstTwoSurahs(context, isFirstPageInFirstOrSecondSurah,
              surahPage, deviceSize, surahCtrl, pageIndex, currentPage - 1));
}