AyahTafsirInlineStyle.defaults constructor

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

Implementation

factory AyahTafsirInlineStyle.defaults({
  required bool isDark,
  required BuildContext context,
}) {
  final scheme = Theme.of(context).colorScheme;
  return AyahTafsirInlineStyle(
    backgroundColor: AppColors.getBackgroundColor(isDark),
    ayahTextColor: AppColors.getTextColor(isDark),
    ayahFontSize: 22,
    tafsirTextColor: isDark ? Colors.grey.shade300 : Colors.grey.shade800,
    tafsirFontSize: 16,
    tafsirBackgroundColor: isDark
        ? Colors.grey.shade900.withValues(alpha: .5)
        : Colors.grey.shade200.withValues(alpha: .7),
    dividerColor: Colors.teal,
    dividerThickness: 1.0,
    tafsirMaxLines: 4,
    tafsirCollapsedHeight: 80,
    readMoreText: 'اقرأ المزيد',
    readLessText: 'اقرأ أقل',
    readMoreButtonColor: scheme.primary,
    readMoreTextStyle: TextStyle(
      color: scheme.primary,
      fontSize: 13,
      fontWeight: FontWeight.w600,
    ),
    ayahPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
    tafsirPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
    ayahNumberColor: scheme.primary,
    optionsBarBackgroundColor: scheme.primary.withValues(alpha: .1),
    tafsirSelectorBarColor: scheme.primary.withValues(alpha: .1),
    tafsirSelectorTextColor: AppColors.getTextColor(isDark),
    fontSizeIconColor: scheme.primary,
    fontSizeWidget: null,
    headerWidget: null,
    optionsBarWidget: null,
    playIconData: Icons.play_arrow,
    playIconColor: scheme.primary,
    iconSize: 24,
    playAllIconData: Icons.playlist_play,
    playAllIconColor: scheme.primary,
    copyIconData: Icons.copy_rounded,
    copyIconColor: scheme.primary,
    bookmarkColorCodes: const [
      0xAAFFD354,
      0xAAF36077,
      0xAA00CD00,
    ],
    iconHorizontalPadding: 4.0,
    bookmarkIconData: Icons.bookmark,
    tafsirBackgroundBorderRadius: 12.0,
  );
}