QuranTopBarStyle.defaults constructor

QuranTopBarStyle.defaults({
  1. required bool isDark,
  2. required BuildContext context,
})

Provide sensible defaults based on theme (isDark)

Implementation

factory QuranTopBarStyle.defaults(
    {required bool isDark, required BuildContext context}) {
  final scheme = Theme.of(context).colorScheme;
  final primary = scheme.primary;
  return QuranTopBarStyle(
    backIconPath: AssetsPath.assets.backArrow,
    backgroundColor: AppColors.getBackgroundColor(isDark),
    textColor: AppColors.getTextColor(isDark),
    accentColor: primary,
    shadowColor: Colors.black.withValues(alpha: .2),
    handleColor: AppColors.getTextColor(isDark).withValues(alpha: 0.25),
    elevation: 5,
    borderRadius: 12,
    padding: const EdgeInsets.symmetric(horizontal: 8.0),
    height: 55,
    menuIconPath: AssetsPath.assets.buttomSheet,
    audioIconPath: AssetsPath.assets.surahsAudio,
    iconSize: 22,
    iconColor: null, // will fallback to textColor
    fontsDialogTitle: 'الخطوط',
    fontsDialogNotes:
        'لجعل مظهر المصحف مشابه لمصحف المدينة يمكنك تحميل خطوط المصحف',
    fontsDialogDownloadingText: 'جارِ التحميل',
    tabIndexLabel: 'الفهرس',
    tabSearchLabel: 'البحث',
    tabBookmarksLabel: 'الفواصل',
    tabSurahsLabel: 'السور',
    tabJozzLabel: 'الأجزاء',
    showMenuButton: true,
    showAudioButton: true,
    showFontsButton: true,
    showBackButton: false,
    optionsIconPath: AssetsPath.assets.options,
    customTopBarWidgets: null,
    tajweedIconPath: AssetsPath.assets.exclamation,
    autoScrollIconPath: AssetsPath.assets.arrowDown,
    showTajweedButton: true,
    showAutoScrollButton: true,
    quranTabText: 'القرآن الكريم',
    tenRecitationsTabText: 'القراءات العشر',
    tabLabelStyle: TextStyle(
      fontSize: 12,
      fontWeight: FontWeight.w700,
      height: 1.3,
      color: AppColors.getTextColor(isDark),
      fontFamily: 'cairo',
      package: 'quran_library',
    ),
    indicatorPadding: const EdgeInsets.all(4),
  );
}