WordInfoBottomSheetStyle.defaults constructor

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

Implementation

factory WordInfoBottomSheetStyle.defaults({
  required bool isDark,
  required BuildContext context,
}) {
  final scheme = Theme.of(context).colorScheme;
  final textColor = AppColors.getTextColor(isDark);

  const fontFamily = 'cairo';

  return WordInfoBottomSheetStyle(
    backgroundColor: AppColors.getBackgroundColor(isDark),
    borderRadius: 12,
    padding: const EdgeInsets.symmetric(vertical: 8.0),
    maxHeightFactor: 0.9,
    maxWidthFactor: 1.0,
    handleWidth: 60,
    handleHeight: 5,
    handleMargin: const EdgeInsets.only(bottom: 8),
    handleBorderRadius: 3,
    handleColor: Colors.grey.shade500,
    titleText: 'عن الكلمة',
    tabRecitationsText: 'القراءات',
    tabTasreefText: 'التصريف',
    tabEerabText: 'الإعراب',
    unavailableDataTemplate: 'بيانات {kind} غير محمّلة على الجهاز.',
    downloadText: 'تحميل',
    downloadingText: 'جاري التحميل...',
    loadErrorText: 'تعذّر تحميل بيانات هذه الكلمة.',
    noDataText: 'لا توجد بيانات لهذه الكلمة.',
    titleTextStyle: TextStyle(
      fontSize: 20,
      fontWeight: FontWeight.bold,
      color: textColor,
      fontFamily: fontFamily,
      package: 'quran_library',
    ),
    titlePadding: EdgeInsets.zero,
    tabLabelStyle: TextStyle(
      fontSize: 16,
      fontWeight: FontWeight.bold,
      color: textColor,
      fontFamily: fontFamily,
      package: 'quran_library',
    ),
    tabIndicatorPadding: const EdgeInsets.all(4),
    tabIndicatorRadius: 10,
    tabIndicatorColor: scheme.primary.withValues(alpha: 0.2),
    dividerHeight: 1,
    contentPadding: const EdgeInsets.all(16),
    bodyTextStyle: TextStyle(
      fontSize: 16,
      color: textColor,
      fontFamily: fontFamily,
      package: 'quran_library',
    ),
    buttonTextStyle: TextStyle(
      fontSize: 16,
      color: textColor,
      fontFamily: fontFamily,
      package: 'quran_library',
    ),
    progressTextStyle: TextStyle(
      fontSize: 16,
      color: textColor,
      fontFamily: fontFamily,
      package: 'quran_library',
    ),
    verticalMargin: 8,
    horizontalMargin: 8,
    innerContainerPadding: const EdgeInsets.all(0),
    tafsirBackgroundColor: AppColors.getBackgroundColor(isDark),
    innerContainerBorderRadius: 16,
    innerShadowColor: Colors.grey.withValues(alpha: 0.1),
    innerShadowBlurRadius: 8,
    innerShadowOffset: const Offset(0, 0),
    innerBorderColor: Colors.grey.withValues(alpha: 0.3),
    innerBorderWidth: 1.2,
    textBackgroundColor: isDark ? const Color(0xFF151515) : Colors.white,
    handleWidget: null,
    audioButtonColor: Colors.teal,
    audioButtonActiveColor: Colors.teal.shade700,
    audioButtonSize: 22,
    playWordTooltip: 'تشغيل الكلمة',
    playAyahWordsTooltip: 'تشغيل كلمات الآية',
    withTitle: true,
    withWordText: true,
    withWordAudioButton: true,
    tabLabelColor: textColor,
    tabUnselectedLabelColor: textColor.withValues(alpha: 0.6),
    tabBackgroundColor: Colors.teal.withValues(alpha: 0.1),
    tabBarHeight: 48,
    innerContainerBoxShadow: [
      BoxShadow(
        color: Colors.grey.withValues(alpha: 0.1),
        blurRadius: 8,
        offset: const Offset(0, 0),
      ),
    ],
    downloadButtonWidget: null,
  );
}