QuranPagesScreen constructor

const QuranPagesScreen({
  1. Key? key,
  2. PreferredSizeWidget? appBar,
  3. Color? ayahIconColor,
  4. Color? ayahSelectedBackgroundColor,
  5. Color? ayahSelectedFontColor,
  6. BannerStyle? bannerStyle,
  7. BasmalaStyle? basmalaStyle,
  8. Color? backgroundColor,
  9. List bookmarkList = const [],
  10. Color? bookmarksColor,
  11. Widget? circularProgressWidget,
  12. DownloadFontsDialogStyle? downloadFontsDialogStyle,
  13. bool isDark = false,
  14. String? juzName,
  15. String? languageCode = 'ar',
  16. void onAyahLongPress(
    1. LongPressStartDetails details,
    2. AyahModel ayah
    )?,
  17. dynamic onPageChanged(
    1. int pageNumber
    )?,
  18. VoidCallback? onPagePress,
  19. void onSurahBannerPress(
    1. SurahNamesModel surah
    )?,
  20. String? sajdaName,
  21. bool showAyahBookmarkedIcon = true,
  22. SurahInfoStyle? surahInfoStyle,
  23. SurahNameStyle? surahNameStyle,
  24. int? surahNumber,
  25. Color? textColor,
  26. List<Color?>? singleAyahTextColors,
  27. Widget? topTitleChild,
  28. bool useDefaultAppBar = true,
  29. bool withPageView = true,
  30. bool? isFontsLocal = false,
  31. String? fontsName = '',
  32. List<int>? ayahBookmarked = const [],
  33. Widget? anotherMenuChild,
  34. void anotherMenuChildOnTap(
    1. AyahModel ayah
    )?,
  35. Widget? secondMenuChild,
  36. void secondMenuChildOnTap(
    1. AyahModel ayah
    )?,
  37. AyahAudioStyle? ayahStyle,
  38. SurahAudioStyle? surahStyle,
  39. bool? isShowAudioSlider = true,
  40. String? appIconUrlForPlayAudioInBackground,
  41. QuranTopBarStyle? topBarStyle,
  42. int? page,
  43. int? startPage,
  44. int? endPage,
  45. bool enableMultiSelect = false,
  46. List<int> highlightedAyahs = const [],
  47. Map<int, List<int>> highlightedAyahNumbersBySurah = const {},
  48. List<({List<int> ayahs, int end, int start})> highlightedAyahNumbersInPages = const [],
  49. List<({int endAyah, int endSurah, int startAyah, int startSurah})> highlightedRanges = const [],
  50. List<String> highlightedRangesText = const [],
  51. required BuildContext parentContext,
})

Implementation

const QuranPagesScreen({
  super.key,
  // التخصيص العام
  this.appBar,
  this.ayahIconColor,
  this.ayahSelectedBackgroundColor,
  this.ayahSelectedFontColor,
  this.bannerStyle,
  this.basmalaStyle,
  this.backgroundColor,
  this.bookmarkList = const [],
  this.bookmarksColor,
  this.circularProgressWidget,
  this.downloadFontsDialogStyle,
  this.isDark = false,
  this.juzName,
  this.languageCode = 'ar',
  this.onAyahLongPress,
  this.onPageChanged,
  this.onPagePress,
  this.onSurahBannerPress,
  this.sajdaName,
  this.showAyahBookmarkedIcon = true,
  this.surahInfoStyle,
  this.surahNameStyle,
  this.surahNumber,
  this.textColor,
  this.singleAyahTextColors,
  this.topTitleChild,
  this.useDefaultAppBar = true,
  this.withPageView = true,
  this.isFontsLocal = false,
  this.fontsName = '',
  this.ayahBookmarked = const [],
  this.anotherMenuChild,
  this.anotherMenuChildOnTap,
  this.secondMenuChild,
  this.secondMenuChildOnTap,
  this.ayahStyle,
  this.surahStyle,
  this.isShowAudioSlider = true,
  this.appIconUrlForPlayAudioInBackground,
  this.topBarStyle,
  // تحديد الصفحات
  this.page,
  this.startPage,
  this.endPage,
  this.enableMultiSelect = false,
  this.highlightedAyahs = const [],
  this.highlightedAyahNumbersBySurah = const {},
  this.highlightedAyahNumbersInPages = const [],
  this.highlightedRanges = const [],
  this.highlightedRangesText = const [],
  required this.parentContext,
}) : assert(
        (page != null && startPage == null && endPage == null) ||
            (page == null && (startPage != null || endPage != null)),
        'حدد إما page لصفحة واحدة أو startPage/endPage لنطاق صفحات',
      );