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,
  );
}