defaults static method
A method to create default styles for the download fonts dialog.
This method provides a convenient way to generate a DownloadFontsDialogStyle instance with predefined default values for various style properties. If no custom values are provided, the default values will be used.
Implementation
static DownloadFontsDialogStyle defaults(
bool isDarkMode, BuildContext context) {
final scheme = Theme.of(context).colorScheme;
final primary = scheme.primary;
return DownloadFontsDialogStyle(
// لون خلفية النافذة الافتراضي
backgroundColor: AppColors.getBackgroundColor(isDarkMode),
// نص الخط الافتراضي
defaultFontText: 'الخط الأساسي',
// لون الفاصل الافتراضي
dividerColor: primary,
// نص خطوط القرآن المحملة الافتراضي
downloadedFontsText: 'خط المصحف',
// لون خلفية زر التحميل الافتراضي
downloadButtonBackgroundColor: primary,
// نص التحميل الافتراضي
downloadingText: 'جاري التحميل...',
// نمط نص التحميل الافتراضي
downloadingStyle: TextStyle(
fontSize: 14.0,
color: AppColors.getTextColor(isDarkMode),
fontFamily: 'cairo',
package: 'quran_library',
),
// نمط اسم الخط الافتراضي
fontNameStyle: TextStyle(
fontSize: 16.0,
color: AppColors.getTextColor(isDarkMode),
fontFamily: 'cairo',
package: 'quran_library',
),
// لون خلفية مؤشر التقدم الخطي الافتراضي
linearProgressBackgroundColor: primary,
// لون مؤشر التقدم الخطي الافتراضي
linearProgressColor: primary.withValues(alpha: .6),
// لون نص العنوان الافتراضي
titleColor: AppColors.getTextColor(isDarkMode),
// نمط نص العنوان الافتراضي
titleStyle: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.bold,
color: AppColors.getTextColor(isDarkMode),
fontFamily: 'cairo',
package: 'quran_library',
),
// عنوان ترويسة النافذة الافتراضي
headerTitle: 'الخطوط',
// لون أيقونة الإغلاق الافتراضي
closeIconColor: AppColors.getTextColor(isDarkMode),
backgroundGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
primary.withValues(alpha: 0.15),
primary.withValues(alpha: 0.05),
],
),
iconColor: primary,
iconSize: 24.0,
iconWidget: SvgPicture.asset(AssetsPath.assets.options,
height: 24.0,
colorFilter: ColorFilter.mode(
Theme.of(context).colorScheme.primary, BlendMode.srcIn)),
notes: 'لجعل مظهر المصحف مشابه لمصحف المدينة يمكنك تحميل خطوط المصحف',
notesColor: AppColors.getTextColor(isDarkMode),
notesStyle: TextStyle(
fontSize: 14.0,
color: AppColors.getTextColor(isDarkMode),
fontFamily: 'cairo',
package: 'quran_library',
),
);
}