towFirstSurahs method
Widget
towFirstSurahs(
- BuildContext context,
- bool isFirstPageInFirstOrSecondSurah,
- QuranPageModel surahPage,
- Size deviceSize,
- SurahCtrl surahCtrl,
- 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 currentPageNumber = surahCtrl.getRealQuranPageNumber(pageIndex);
return TopAndBottomWidget(
pageIndex: currentPageNumber - 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,
currentPageNumber - 1))
: _firstTwoSurahs(
context,
isFirstPageInFirstOrSecondSurah,
surahPage,
deviceSize,
surahCtrl,
pageIndex,
currentPageNumber - 1)
: _firstTwoSurahs(
context,
isFirstPageInFirstOrSecondSurah,
surahPage,
deviceSize,
surahCtrl,
pageIndex,
currentPageNumber - 1));
}