From d3706d67a44ba533a3002297a63a9a85bae70439 Mon Sep 17 00:00:00 2001 From: Kalonkarthik Date: Fri, 11 Apr 2025 17:53:50 +0530 Subject: [PATCH] font family changed --- android/app/src/main/AndroidManifest.xml | 10 ++ .../UAE_Numbers/uae_numbers.dart | 20 ++- .../Screens/app_tour/Target_content.dart | 7 +- .../auth_verification/registration.dart | 24 +++ .../Screens/charts/screens/chart_screen.dart | 166 +++++++++++++++--- .../components/themed_text_field.dart | 7 + .../routes/auth_routes/login_route.dart | 24 ++- .../tab_routes/home_route.dart | 82 +++++++-- .../drawer_routes/Drawer Items/bookmark.dart | 79 +++++++-- .../drawer_routes/Drawer Items/contactUs.dart | 32 +++- .../Drawer Items/edit_profile.dart | 121 +++++++++++-- .../drawer_routes/Drawer Items/feedback.dart | 72 ++++++-- .../notification/notification.dart | 21 ++- .../drawer_routes/custom_drawer_routes.dart | 132 ++++++++++++-- pubspec.lock | 74 ++++---- 15 files changed, 734 insertions(+), 137 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index f1091bc0..a6c1c4e6 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -78,5 +78,15 @@ + + + + + + + + + + diff --git a/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart index 3bb9ea40..141cf56f 100644 --- a/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart +++ b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart @@ -48,7 +48,8 @@ class UaeNumbers extends StatelessWidget { title: Text(context.translate( 'UAE Numbers', 'أرقام الإمارات', - )), + ), + ), body: uaenumberWidget(), ), ); @@ -244,7 +245,10 @@ class _UaenumberWidgetState extends ConsumerState { // Centers text horizontally decoration: InputDecoration( hintText: AppLocalizations.of(context)!.search, - hintStyle: TextStyle(color: Color(0xFFAA8E83)), + hintStyle: TextStyle(color: Color(0xFFAA8E83), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), prefixIconConstraints: BoxConstraints(maxWidth: 42, maxHeight: 42), prefixIcon: Container( @@ -375,6 +379,10 @@ class _UaenumberWidgetState extends ConsumerState { child: Text( title, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, fontWeight: FontWeight.w600, color: color, @@ -465,6 +473,10 @@ class _UaenumberWidgetState extends ConsumerState { Text( value, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 20, color: isPopulationGrowth ? (isPositive ? Colors.green : Colors.red) @@ -546,6 +558,10 @@ class _CustomExpandableTileState extends State { Text( widget.title, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontWeight: FontWeight.w600, fontSize: 20, diff --git a/lib/presentation/Screens/app_tour/Target_content.dart b/lib/presentation/Screens/app_tour/Target_content.dart index 51e52b06..0ffdabeb 100644 --- a/lib/presentation/Screens/app_tour/Target_content.dart +++ b/lib/presentation/Screens/app_tour/Target_content.dart @@ -1,6 +1,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; import 'package:flutter/material.dart'; +import 'package:uae_stat/domain/use_cases/language.dart'; final allTargetsCompletedProvider = StateProvider((ref) => true); final chartsTourProvider = StateProvider((ref) => true); @@ -33,7 +34,11 @@ TargetContent createTargetContent({ ), child: Text( text, - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 18, ), diff --git a/lib/presentation/Screens/auth_verification/registration.dart b/lib/presentation/Screens/auth_verification/registration.dart index 659bfd50..c1dce18d 100644 --- a/lib/presentation/Screens/auth_verification/registration.dart +++ b/lib/presentation/Screens/auth_verification/registration.dart @@ -629,6 +629,12 @@ class _RegisterScreenState extends ConsumerState { controller: _usernameController, // focusNode: _focusNodes[0], decoration: InputDecoration( + errorStyle: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + ), // hintText: _showHints[0] ? 'Username' : null, hintText: _showHints[0] ? AppLocalizations.of( @@ -730,6 +736,12 @@ class _RegisterScreenState extends ConsumerState { controller: _emailController, // focusNode: _focusNodes[1], decoration: InputDecoration( + errorStyle: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + ), // hintText: 'Enter your email', hintText: _showHints[1] ? AppLocalizations.of( @@ -831,6 +843,12 @@ class _RegisterScreenState extends ConsumerState { // focusNode: _focusNodes[2], obscureText: _obscurePassword, decoration: InputDecoration( + errorStyle: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + ), hintText: _showHints[2] ? AppLocalizations.of( context)! @@ -962,6 +980,12 @@ class _RegisterScreenState extends ConsumerState { obscureText: _obscureConfirmPassword, decoration: InputDecoration( + errorStyle: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + ), hintText: _showHints[3] ? AppLocalizations.of( context)! diff --git a/lib/presentation/Screens/charts/screens/chart_screen.dart b/lib/presentation/Screens/charts/screens/chart_screen.dart index d7e06d53..5967d531 100644 --- a/lib/presentation/Screens/charts/screens/chart_screen.dart +++ b/lib/presentation/Screens/charts/screens/chart_screen.dart @@ -278,6 +278,10 @@ class _ChartScreen1State extends ConsumerState { 'هل أنت متأكد أنك تريد إزالة هذه الإشارة المرجعية؟'), textAlign: TextAlign.center, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 18, color: Color(0xFF898C81), ), @@ -309,6 +313,10 @@ class _ChartScreen1State extends ConsumerState { child: Text( context.translate('No', 'لا'), style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Color(0xFFAA8E83), fontSize: 16, ), @@ -332,7 +340,10 @@ class _ChartScreen1State extends ConsumerState { ), child: Text( context.translate('Yes', 'نعم'), - style: TextStyle(color: Colors.white, fontSize: 16), + style: TextStyle(color: Colors.white, fontSize: 16, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ), ), @@ -371,6 +382,10 @@ class _ChartScreen1State extends ConsumerState { ), textAlign: TextAlign.center, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 18, color: Color(0xFF898C81), ), @@ -402,6 +417,10 @@ class _ChartScreen1State extends ConsumerState { child: Text( context.translate('No', 'لا'), style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Color(0xFFAA8E83), fontSize: 16, ), @@ -425,7 +444,10 @@ class _ChartScreen1State extends ConsumerState { ), child: Text( context.translate('Yes', 'نعم'), - style: TextStyle(color: Colors.white, fontSize: 16), + style: TextStyle(color: Colors.white, fontSize: 16, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ), ), @@ -472,9 +494,14 @@ class _ChartScreen1State extends ConsumerState { return null; } - void handleSkip() { + Future handleSkip() async { tutorialCoachMark.skip(); debugPrint('Skip clicked'); + final prefs = await SharedPreferences.getInstance(); + String? loginCount = prefs.getString('login_count'); + if (loginCount == '1') { + await prefs.setString('login_count', '2'); + } ref.read(chartsTourProvider.notifier).state = true; ref.read(previousChartsTourProvider.notifier).state = true; ref.read(homeTourProvider.notifier).state = true; @@ -597,7 +624,11 @@ class _ChartScreen1State extends ConsumerState { ), child: Text( AppLocalizations.of(context)!.skip, - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 14, ), @@ -761,7 +792,11 @@ class _ChartScreen1State extends ConsumerState { ), child: Text( AppLocalizations.of(context)!.skip, - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 14, ), @@ -931,7 +966,11 @@ class _ChartScreen1State extends ConsumerState { ), child: Text( AppLocalizations.of(context)!.skip, - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 14, ), @@ -1091,7 +1130,11 @@ class _ChartScreen1State extends ConsumerState { ), child: Text( AppLocalizations.of(context)!.skip, - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 14, ), @@ -1624,7 +1667,10 @@ class _ChartScreen1State extends ConsumerState { color: Color(0xFF8E8E8E), fontSize: 20, fontWeight: FontWeight.w500, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), ), ], @@ -1673,7 +1719,10 @@ class _ChartScreen1State extends ConsumerState { style: TextStyle( fontSize: 16, fontWeight: FontWeight.w700, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Color(0xFF8E8E8E), ), ), @@ -1761,7 +1810,12 @@ class _ChartScreen1State extends ConsumerState { // "${locale == 'ar' ? 'يختار ' : 'Select '}" "${context.translate(filter_text_and_order['en'], filter_text_and_order['ar'])}", style: TextStyle( - color: Colors.grey)) + color: Colors.grey, + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), + ) ] : selectedFilter["filter_data"] .map((value) { @@ -1835,6 +1889,10 @@ class _ChartScreen1State extends ConsumerState { child: Text( context.translate('Clear', 'واضح'), style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 13, fontWeight: FontWeight.bold, @@ -1907,6 +1965,10 @@ class _ChartScreen1State extends ConsumerState { child: Text( context.translate('Filter', 'فلتر'), style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 13, fontWeight: FontWeight.bold, @@ -2258,7 +2320,10 @@ class _ChartScreen1State extends ConsumerState { color: Colors.white, fontSize: 26, fontWeight: FontWeight.w400, - fontFamily: 'Roboto'), + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), Container( width: mywidth / 7, @@ -2274,7 +2339,10 @@ class _ChartScreen1State extends ConsumerState { color: Colors.white, fontSize: 20, fontWeight: FontWeight.w400, - fontFamily: 'Roboto'), + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ], ), @@ -2318,6 +2386,10 @@ class _ChartScreen1State extends ConsumerState { 'إشارة مرجعية', ), style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, color: Color(int.parse( (chartScreenData[ @@ -2332,7 +2404,11 @@ class _ChartScreen1State extends ConsumerState { 'Bookmark', 'إشارة مرجعية', ), - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, color: Colors.white, ), @@ -2384,7 +2460,11 @@ class _ChartScreen1State extends ConsumerState { children: [ Text( context.translate('Share', 'يشارك'), - style: const TextStyle( + style:TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, color: Colors.white, ), @@ -2427,7 +2507,11 @@ class _ChartScreen1State extends ConsumerState { 'Filter', 'فلتر', ), - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, color: Colors.white, ), @@ -2718,6 +2802,10 @@ class _ChartScreen1State extends ConsumerState { child: Text( tab['name']!, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: isActive ? Colors.black : Colors.white, fontWeight: isActive ? FontWeight.w500 : FontWeight.w400, fontSize: 13, @@ -2880,7 +2968,10 @@ class CardWidget extends StatelessWidget { ), child: Text( chart_heading ?? 'NA', - style: TextStyle(color: Colors.white), + style: TextStyle(color: Colors.white, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ), ), @@ -2897,6 +2988,10 @@ class CardWidget extends StatelessWidget { overflow: TextOverflow.ellipsis, // Truncate text with '...' style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 11, fontWeight: FontWeight.w400, color: Colors.black87, @@ -2908,7 +3003,11 @@ class CardWidget extends StatelessWidget { RegExp(r'\d').hasMatch(response[0]['display_value'] ?? '') ? '(${response[0]['display_value'] ?? 'NA'})' : '${response[0]['display_value'] ?? 'NA'}', - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 11, color: Colors.grey, overflow: @@ -2926,6 +3025,10 @@ class CardWidget extends StatelessWidget { response[0]['value'] ?? 'NA', textAlign: TextAlign.center, // Ensures text is centered style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 23, fontWeight: FontWeight.w800, color: (response[0]['font_color'] ?? '').isEmpty @@ -3013,7 +3116,10 @@ class CardWidget extends StatelessWidget { child: Text( chart_heading ?? 'NA', style: - TextStyle(color: Colors.white, fontSize: 10), + TextStyle(color: Colors.white, fontSize: 10, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ), ), @@ -3030,6 +3136,10 @@ class CardWidget extends StatelessWidget { maxLines: 2, overflow: TextOverflow.ellipsis, // Truncate with '...' style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 11, fontWeight: FontWeight.w400, color: Colors.black87, @@ -3045,7 +3155,11 @@ class CardWidget extends StatelessWidget { ? '(${response[0]['display_value'] ?? 'NA'})' : '${response[0]['display_value'] ?? 'NA'}', - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 11, color: Colors.grey, overflow: TextOverflow.ellipsis, @@ -3062,6 +3176,10 @@ class CardWidget extends StatelessWidget { overflow: TextOverflow.ellipsis, maxLines: 1, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 23, fontWeight: FontWeight.w900, color: (response[0]['font_color'] ?? '').isEmpty @@ -3097,6 +3215,10 @@ class CardWidget extends StatelessWidget { Text( response[1]['value'] ?? 'NA', style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, fontWeight: FontWeight.w600, color: (response[1]['font_color'] ?? '').isEmpty @@ -3124,7 +3246,11 @@ class CardWidget extends StatelessWidget { RegExp(r'\d').hasMatch(response[1]['display_value'] ?? '') ? '(${response[1]['display_value'] ?? 'NA'})' : '${response[1]['display_value'] ?? 'NA'}', - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 8, fontWeight: FontWeight.w500, color: Colors.grey, diff --git a/lib/presentation/components/themed_text_field.dart b/lib/presentation/components/themed_text_field.dart index 843a7876..aa6aa5ae 100644 --- a/lib/presentation/components/themed_text_field.dart +++ b/lib/presentation/components/themed_text_field.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:uae_stat/config/my_theme.dart'; +import 'package:uae_stat/domain/use_cases/language.dart'; class ThemedFormField extends HookWidget { const ThemedFormField({ @@ -43,6 +44,12 @@ class ThemedFormField extends HookWidget { ), ); final inputDecoration = InputDecoration( + errorStyle: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + ), filled: true, fillColor: Colors.white, contentPadding: const EdgeInsets.symmetric(vertical: 14, horizontal: 15), diff --git a/lib/presentation/routes/auth_routes/login_route.dart b/lib/presentation/routes/auth_routes/login_route.dart index 8a5ad7ab..b89cab20 100644 --- a/lib/presentation/routes/auth_routes/login_route.dart +++ b/lib/presentation/routes/auth_routes/login_route.dart @@ -288,6 +288,10 @@ class LoginRoute extends HookConsumerWidget { 'إعادة تعيين كلمة المرور', ), style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: locale?.languageCode == 'ar' ? 18 : 20, color: Color(0xFF898C81), fontWeight: FontWeight.w600), @@ -298,11 +302,21 @@ class LoginRoute extends HookConsumerWidget { validator: emailValidation(), controller: emailCtl, decoration: InputDecoration( + errorStyle: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + ), labelText: context.translate( 'Email address', 'عنوان البريد الإلكتروني', ), labelStyle: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: locale?.languageCode == 'ar' ? 13 : 16, color: Color(0xFF898C81), // For label text color // fontWeight: FontWeight.w600, @@ -330,6 +344,10 @@ class LoginRoute extends HookConsumerWidget { 'Return', 'يعود', ), + style: TextStyle( fontSize: context.translate(16, 10), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ), ElevatedButton( @@ -355,6 +373,10 @@ class LoginRoute extends HookConsumerWidget { 'Send Reset Email', 'إرسال إعادة تعيين البريد الإلكتروني', ), + style: TextStyle( fontSize: context.translate(16, 10), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ), ], @@ -675,7 +697,7 @@ class LoginRoute extends HookConsumerWidget { style: TextStyle( fontFamily: context.translate( 'Roboto', - 'Roboto', + 'NotoKufi', ), fontSize: locale?.languageCode == 'ar' ? 38 : 40, fontWeight: FontWeight.w300, diff --git a/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart b/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart index 4863716d..bc83b5e2 100644 --- a/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart +++ b/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart @@ -211,7 +211,10 @@ class _MyHomePageState extends ConsumerState { title: Text( context.translate('Log Out Confirmation', 'تأكيد تسجيل الخروج'), textAlign: TextAlign.center, - style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), content: Padding( padding: const EdgeInsets.all(20.0), @@ -220,6 +223,10 @@ class _MyHomePageState extends ConsumerState { 'هل أنت متأكد أنك تريد تسجيل الخروج؟'), textAlign: TextAlign.center, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 18, color: Color(0xFF898C81), ), @@ -247,6 +254,10 @@ class _MyHomePageState extends ConsumerState { child: Text( context.translate('Cancel', 'إلغاء'), style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Color(0xFFAA8E83), fontSize: 16, ), @@ -270,7 +281,10 @@ class _MyHomePageState extends ConsumerState { .scaleDown, // Prevents wrapping while adjusting text size child: Text( context.translate('Log Out', 'تسجيل الخروج'), - style: TextStyle(color: Colors.white, fontSize: 16), + style: TextStyle(color: Colors.white, fontSize: 16, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), textAlign: TextAlign.center, ), ), @@ -366,9 +380,14 @@ class EconomyStatsState extends ConsumerState { late List previousHomeTargets; late final Locale locale; - void handleSkip() { + Future handleSkip() async { tutorialCoachMark.skip(); debugPrint('Skip clicked'); + final prefs = await SharedPreferences.getInstance(); + String? loginCount = prefs.getString('login_count'); + if (loginCount == '1') { + await prefs.setString('login_count', '2'); + } ref.read(chartsTourProvider.notifier).state = true; ref.read(previousChartsTourProvider.notifier).state = true; ref.read(homeTourProvider.notifier).state = true; @@ -478,7 +497,7 @@ class EconomyStatsState extends ConsumerState { right: 10), // Adjust the value as needed child: Text( '1/7', - style: const TextStyle( + style: TextStyle( color: Colors.white, fontSize: 14, ), @@ -503,9 +522,13 @@ class EconomyStatsState extends ConsumerState { ), child: Text( AppLocalizations.of(context)!.skip, - style: const TextStyle( + style: TextStyle( color: Colors.white, fontSize: 14, + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), ), ), @@ -622,9 +645,13 @@ class EconomyStatsState extends ConsumerState { ), child: Text( AppLocalizations.of(context)!.skip, - style: const TextStyle( + style: TextStyle( color: Colors.white, fontSize: 14, + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), ), ), @@ -796,7 +823,11 @@ class EconomyStatsState extends ConsumerState { ), child: Text( AppLocalizations.of(context)!.skip, - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 14, ), @@ -978,7 +1009,11 @@ class EconomyStatsState extends ConsumerState { ), child: Text( AppLocalizations.of(context)!.skip, - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 14, ), @@ -1251,7 +1286,11 @@ class EconomyStatsState extends ConsumerState { : null, text: mainTopic['main_topic'], backgroundColor: backgroundColor, - textStyle: const TextStyle( + textStyle: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 24, fontWeight: FontWeight.w500, color: Colors.white, @@ -1435,7 +1474,11 @@ class RoundedCornerContainer extends StatelessWidget { child: Text( text, style: textStyle ?? - const TextStyle( + TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 24, fontWeight: FontWeight.bold, color: Colors.white, @@ -1526,12 +1569,15 @@ class InfoCard extends StatelessWidget { // ), Text( title, - style: const TextStyle( + style: TextStyle( // fontSize: 11, fontSize: 12, fontWeight: FontWeight.w400, // color: Colors.black, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Color(0xFF000000), ), ), @@ -1546,10 +1592,13 @@ class InfoCard extends StatelessWidget { Text( subtitle, textAlign: TextAlign.center, - style: const TextStyle( + style: TextStyle( // fontSize: 11, fontSize: 12 * 1.1, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w400, color: Color(0xFF8E8E8E), ), @@ -1570,7 +1619,10 @@ class InfoCard extends StatelessWidget { style: TextStyle( fontSize: 18, fontWeight: FontWeight.w900, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: textcolor ?? Colors.black, ), ), diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart b/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart index b8b6f5ec..1c74263e 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart @@ -221,7 +221,10 @@ class _BookMarkState extends ConsumerState { 'Unable to remove from bookmarks. Please try again', 'تعذر الإزالة من الإشارات المرجعية. يرجى المحاولة مرة أخرى.',), style: - TextStyle(color: Color(0xFFEB5F24), fontWeight: FontWeight.w600), + TextStyle(color: Color(0xFFEB5F24), fontWeight: FontWeight.w600, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), backgroundColor: Color(0xFFD6E9C6), duration: Duration(seconds: 2), @@ -260,6 +263,10 @@ class _BookMarkState extends ConsumerState { 'هل أنت متأكد أنك تريد إزالة هذه الإشارة المرجعية؟'), textAlign: TextAlign.center, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 18, color: Color(0xFF898C81), ), @@ -291,6 +298,10 @@ class _BookMarkState extends ConsumerState { child: Text( context.translate('No', 'لا'), style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Color(0xFFAA8E83), fontSize: 16, ), @@ -314,7 +325,11 @@ class _BookMarkState extends ConsumerState { ), child: Text( context.translate('Yes', 'نعم'), - style: TextStyle(color: Colors.white, fontSize: 16), + style: TextStyle(color: Colors.white, fontSize: 16, + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ), ), @@ -489,6 +504,10 @@ class _BookMarkState extends ConsumerState { context.translate('No BookMark Added', 'لم يتم إضافة أي علامة مرجعية'), style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, color: Colors.grey), ), ], @@ -506,7 +525,12 @@ class _BookMarkState extends ConsumerState { context.translate('No BookMark Added', 'لم يتم إضافة أي علامة مرجعية'), style: TextStyle( - fontSize: 16, color: Colors.grey), + fontSize: 16, color: Colors.grey, + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + ), ), ], ), @@ -529,6 +553,10 @@ class _BookMarkState extends ConsumerState { Text( tabs[selectedTabIndex]['title'], style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontWeight: FontWeight.w600, fontSize: 20, @@ -608,7 +636,11 @@ class _BookMarkState extends ConsumerState { alignment: Alignment.center, child: Text( data['title'] ?? '', - style: const TextStyle(fontWeight: FontWeight.w500), + style: TextStyle(fontWeight: FontWeight.w500, + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), overflow: TextOverflow.ellipsis, maxLines: 1, ), @@ -642,14 +674,23 @@ class _BookMarkState extends ConsumerState { ), Text( data['value_source'] ?? '', - style: const TextStyle( - fontWeight: FontWeight.w500, color: Colors.grey), + style: TextStyle( + fontWeight: FontWeight.w500, color: Colors.grey, + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), + ), overflow: TextOverflow.ellipsis, maxLines: 1, ), Text( data['value'] ?? '', style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 28, fontWeight: FontWeight.bold, color: data['valueColor'], @@ -711,7 +752,10 @@ class _BookMarkState extends ConsumerState { alignment: Alignment.center, child: Text( data['title'] ?? '', - style: const TextStyle(fontWeight: FontWeight.w500), + style: TextStyle(fontWeight: FontWeight.w500, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), overflow: TextOverflow.ellipsis, maxLines: 1, ), @@ -732,14 +776,21 @@ class _BookMarkState extends ConsumerState { ), Text( data['value_source'] ?? '', - style: const TextStyle( - fontWeight: FontWeight.w500, color: Colors.grey), + style: TextStyle( + fontWeight: FontWeight.w500, color: Colors.grey, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), overflow: TextOverflow.ellipsis, maxLines: 1, ), Text( data['value'] ?? '', style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 28, fontWeight: FontWeight.bold, color: styleColor, @@ -788,7 +839,11 @@ class TabBarHeader extends StatelessWidget { : Colors.grey[700]; }), ), - child: Text(text), + child: Text(text, + style: TextStyle( fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),),), ), if (index < tabs.length - 1) buildDivider(), ], @@ -867,6 +922,10 @@ class _CustomExpandableTileState extends State { Text( widget.title, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontWeight: FontWeight.w600, fontSize: 20, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/contactUs.dart b/lib/presentation/routes/drawer_routes/Drawer Items/contactUs.dart index 41ad29f8..a86273cb 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/contactUs.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/contactUs.dart @@ -215,7 +215,11 @@ class _ContactState extends ConsumerState { children: [ Text( context.translate(title, titleAr), - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Color(0xFF265E84), fontSize: 18, fontWeight: FontWeight.w600, @@ -283,11 +287,17 @@ class _ContactState extends ConsumerState { child: RichText( text: TextSpan( text: values[0], - style: const TextStyle(fontSize: 14, color: Color(0xFF5F5F5F)), + style: TextStyle(fontSize: 14, color: Color(0xFF5F5F5F), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), children: [ TextSpan(text: ':',), TextSpan(text: values[1], - style: TextStyle(fontSize: 14, color:Color(0xFF985400)) + style: TextStyle(fontSize: 14, color:Color(0xFF985400), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),) ), ], ), @@ -306,11 +316,17 @@ class _ContactState extends ConsumerState { child: RichText( text: TextSpan( text: values[0], - style: const TextStyle(fontSize: 14, color: Color(0xFF5F5F5F)), + style: TextStyle(fontSize: 14, color: Color(0xFF5F5F5F), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), children: [ TextSpan(text: ':',), TextSpan(text: values[1], - style: TextStyle(fontSize: 14, color:Color(0xFF985400)) + style: TextStyle(fontSize: 14, color:Color(0xFF985400), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),) ), ], ), @@ -319,7 +335,11 @@ class _ContactState extends ConsumerState { :Expanded( child: Text( text, - style: const TextStyle( + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 14, color: Color(0xFF5F5F5F), ), diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart b/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart index 85e090e9..b277a7f1 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart @@ -514,7 +514,10 @@ class _EditProfileState extends ConsumerState { child: BaseScaffold( title: Text( AppLocalizations.of(context)!.my_profile, - style: TextStyle(color: Color(0xFF985400)), + style: TextStyle(color: Color(0xFF985400), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), body: isLoader ? Container( @@ -710,6 +713,10 @@ class _EditProfileState extends ConsumerState { AppLocalizations.of(context)! .register_name, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, fontWeight: FontWeight.w500, color: Colors.grey, @@ -723,7 +730,10 @@ class _EditProfileState extends ConsumerState { focusNode: _focusNodes[0], decoration: InputDecoration( // hintText: _showHints[0] ? 'Mohammad Hassan' : null, - hintStyle: TextStyle(color: Colors.grey), + hintStyle: TextStyle(color: Colors.grey, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), @@ -737,6 +747,10 @@ class _EditProfileState extends ConsumerState { Text( AppLocalizations.of(context)!.email_id, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, fontWeight: FontWeight.w500, color: Colors.grey, @@ -763,6 +777,10 @@ class _EditProfileState extends ConsumerState { Text( AppLocalizations.of(context)!.full_name, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, fontWeight: FontWeight.w500, color: Colors.grey, @@ -793,7 +811,11 @@ class _EditProfileState extends ConsumerState { focusNode: _focusNodes[2], decoration: InputDecoration( // hintText: _showHints[2] ? 'Mohammad' : null, - hintStyle: TextStyle(color: Colors.grey), + hintStyle: TextStyle(color: Colors.grey, + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), @@ -812,6 +834,10 @@ class _EditProfileState extends ConsumerState { Text( AppLocalizations.of(context)!.dob, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, fontWeight: FontWeight.w500, color: Colors.grey, @@ -828,7 +854,10 @@ class _EditProfileState extends ConsumerState { borderRadius: BorderRadius.circular(8), ), // hintText: _showHints[3] ? 'Select your Date of Birth' : null, - hintStyle: TextStyle(color: Colors.grey), + hintStyle: TextStyle(color: Colors.grey, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), suffixIcon: Container( width: 45, padding: EdgeInsets.only(right: 1), @@ -852,6 +881,10 @@ class _EditProfileState extends ConsumerState { Text( AppLocalizations.of(context)!.region, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, fontWeight: FontWeight.w500, ), @@ -866,7 +899,10 @@ class _EditProfileState extends ConsumerState { () => _isHoveringDropdown = false), child: DropdownButtonFormField( style: TextStyle( - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, fontWeight: FontWeight.normal, color: Color(0xFF544C4C), @@ -919,6 +955,10 @@ class _EditProfileState extends ConsumerState { AppLocalizations.of(context)! .preferredLang, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, fontWeight: FontWeight.w500), ), @@ -932,7 +972,10 @@ class _EditProfileState extends ConsumerState { () => _isHoveringPreferredLang = false), child: DropdownButtonFormField( style: TextStyle( - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 16, fontWeight: FontWeight.normal, color: Color(0xFF544C4C), @@ -1020,6 +1063,10 @@ class _EditProfileState extends ConsumerState { context)! .agree, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.black), children: [ TextSpan( @@ -1029,6 +1076,10 @@ class _EditProfileState extends ConsumerState { )! .terms_conditions, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), // color: Colors.blue, color: Color( 0xFF648CBA), @@ -1049,6 +1100,10 @@ class _EditProfileState extends ConsumerState { )! .t_and, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.black, ), ), @@ -1059,6 +1114,10 @@ class _EditProfileState extends ConsumerState { )! .privacy_policy, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), // color: Colors.blue, color: Color( 0xFF648CBA), @@ -1079,6 +1138,10 @@ class _EditProfileState extends ConsumerState { )! .conditions, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.black, ), ), @@ -1106,6 +1169,10 @@ class _EditProfileState extends ConsumerState { child: Text( 'Please agree to terms and conditions', style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.red[700], fontSize: 12, ), @@ -1130,7 +1197,10 @@ class _EditProfileState extends ConsumerState { color: Color(0xFF985400), fontSize: 14, fontWeight: FontWeight.w700, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), // decoration: TextDecoration.underline ), ), @@ -1181,7 +1251,10 @@ class _EditProfileState extends ConsumerState { children: [ Text( AppLocalizations.of(context)!.save, - style: TextStyle(color: Colors.white), + style: TextStyle(color: Colors.white, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), SizedBox( width: @@ -1219,10 +1292,13 @@ class ConfirmationDialog extends StatelessWidget { children: [ Text( 'Are you sure you want to save this page?', - style: const TextStyle( + style: TextStyle( fontSize: 14, color: Color(0xFF898C81), - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w400, ), textAlign: TextAlign.center, @@ -1234,14 +1310,20 @@ class ConfirmationDialog extends StatelessWidget { style: TextStyle( fontSize: 14, color: Color(0xFF898C81), - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w400, ), children: [ TextSpan( text: 'Country', style: - TextStyle(fontWeight: FontWeight.w500), // Bold for "name" + TextStyle(fontWeight: FontWeight.w500, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), // Bold for "name" ), TextSpan( text: ' or ', @@ -1249,6 +1331,10 @@ class ConfirmationDialog extends StatelessWidget { TextSpan( text: 'Profile Image', style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w700, ), // Bold for "date of birth" ), @@ -1284,7 +1370,10 @@ class ConfirmationDialog extends StatelessWidget { ), child: Text( 'Cancel', - style: TextStyle(color: Color(0xFF92722A)), + style: TextStyle(color: Color(0xFF92722A), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ), ElevatedButton( @@ -1296,9 +1385,13 @@ class ConfirmationDialog extends StatelessWidget { borderRadius: BorderRadius.circular(8), ), ), - child: const Text( + child: Text( 'Confirm', style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w500, ), ), diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/feedback.dart b/lib/presentation/routes/drawer_routes/Drawer Items/feedback.dart index 9566ae67..1af1ef33 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/feedback.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/feedback.dart @@ -266,7 +266,10 @@ class _FeedbackFormState extends ConsumerState AppLocalizations.of(context)!.feedback_title, style: TextStyle( fontSize: 24, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w500), ), // appBar: AppBar( @@ -330,10 +333,13 @@ class _FeedbackFormState extends ConsumerState 'Do you have a suggestion or had any problem? Let us know.', 'هل لديك اقتراح أو واجهت أي مشكلة؟ أخبرنا', ), - style: const TextStyle( + style: TextStyle( fontSize: 18, color: Color(0xFF898C81), - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w700, ), textAlign: TextAlign.center, @@ -346,9 +352,12 @@ class _FeedbackFormState extends ConsumerState child: Text( context.translate('How was your experience with us today?', 'كيف كانت تجربتك معنا اليوم؟'), - style: const TextStyle( + style: TextStyle( fontSize: 18, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w400, color: Color(0xff898C81), ), @@ -389,7 +398,10 @@ class _FeedbackFormState extends ConsumerState 'Please rate your experience before submitting your feedback.', 'يرجى تقييم تجربتك قبل تقديم ملاحظاتك.', ), - style: TextStyle(color: Color(0xFFD83731), fontSize: 14), + style: TextStyle(color: Color(0xFFD83731), fontSize: 14, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ), ], @@ -402,9 +414,12 @@ class _FeedbackFormState extends ConsumerState child: Text( context.translate('How good did we do in these aspects?', 'ما مدى جودة أدائنا في هذه الجوانب؟'), - style: const TextStyle( + style: TextStyle( fontSize: 18, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w400, color: Color(0xFF898C81), ), @@ -452,11 +467,17 @@ class _FeedbackFormState extends ConsumerState minLines: 5, // Start with 5 lines maxLines: null, // Allows the field to expand automatically maxLength: _characterLimit, - style: TextStyle(color: Color(0xFF898C81)), + style: TextStyle(color: Color(0xFF898C81), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), decoration: InputDecoration( hintText: context.translate( 'Tell us how we can improve', 'أخبرنا كيف يمكننا التحسين'), - hintStyle: TextStyle(color: Color(0xFF898C81)), + hintStyle: TextStyle(color: Color(0xFF898C81), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), border: OutlineInputBorder( borderRadius: BorderRadius.circular(10.0), borderSide: BorderSide(color: Color(0xFF7296BE), width: 1), @@ -585,12 +606,18 @@ class _FeedbackFormState extends ConsumerState Text( '${AppLocalizations.of(context)!.thankYou} $userName !', - style: const TextStyle(fontSize: 24, fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), const SizedBox(height: 15), Text( AppLocalizations.of(context)!.feedback_message, - style: TextStyle(fontSize: 16, color: Color(0xFF898C81)), + style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), textAlign: TextAlign.center, ), // const SizedBox(height: 30), @@ -643,13 +670,20 @@ class _FeedbackFormState extends ConsumerState Text( AppLocalizations.of(context)!.failed_to_sharefeedback, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 24, fontWeight: FontWeight.bold, color: Color(0xFF414042)), ), const SizedBox(height: 10), Text(AppLocalizations.of(context)!.feedback_failed_msg, - style: const TextStyle(fontSize: 16, color: Color(0xFF898C81)), + style: TextStyle(fontSize: 16, color: Color(0xFF898C81), fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), textAlign: TextAlign.center), // const SizedBox(height: 30), // ElevatedButton( @@ -700,7 +734,10 @@ class _FeedbackFormState extends ConsumerState child: Text( label, style: TextStyle( - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w400, fontSize: 14, color: Colors.black, @@ -747,9 +784,12 @@ class _FeedbackFormState extends ConsumerState mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(label, - style: const TextStyle( + style: TextStyle( fontSize: 14, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w400, color: Color(0xFF898C81), )), diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/notification/notification.dart b/lib/presentation/routes/drawer_routes/Drawer Items/notification/notification.dart index a96b179d..273cfd6a 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/notification/notification.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/notification/notification.dart @@ -259,7 +259,10 @@ class _NotificationPageState extends ConsumerState { Text( 'No notifications available.', style: TextStyle( - fontSize: 16, color: Colors.grey), + fontSize: 16, color: Colors.grey, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), ], ), @@ -333,7 +336,13 @@ class TabBarHeader extends StatelessWidget { : Colors.grey[700]; }), ), - child: Text(text), + child: Text(text, + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), + ), ), if (index < tabs.length - 1) buildDivider(), ], @@ -402,6 +411,10 @@ class NotificationTile extends StatelessWidget { style: TextStyle( color: isPushed ? const Color(0xFF414042) : const Color(0x99414042), fontWeight: FontWeight.bold, + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), ), subtitle: Text( @@ -410,6 +423,10 @@ class NotificationTile extends StatelessWidget { color: isPushed ? const Color(0xFF8E8E8E) : const Color(0x998E8E8E), fontSize: 12, fontWeight: FontWeight.w400, + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), ), trailing: const Icon(Icons.arrow_forward_ios, diff --git a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart index e0da5e82..f9039256 100644 --- a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart +++ b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart @@ -128,9 +128,14 @@ class _BaseScaffoldState extends ConsumerState { toggleHeight = cardSize.height; } - void handleSkip() { + Future handleSkip() async { tutorialCoachMark.skip(); debugPrint('Skip clicked'); + final prefs = await SharedPreferences.getInstance(); + String? loginCount = prefs.getString('login_count'); + if (loginCount == '1') { + await prefs.setString('login_count', '2'); + } ref.read(chartsTourProvider.notifier).state = true; ref.read(previousChartsTourProvider.notifier).state = true; ref.read(homeTourProvider.notifier).state = true; @@ -199,6 +204,10 @@ class _BaseScaffoldState extends ConsumerState { child: Text( AppLocalizations.of(context)!.skip, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 14, ), @@ -348,6 +357,10 @@ class _BaseScaffoldState extends ConsumerState { // 'Skip', AppLocalizations.of(context)!.skip, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 14, ), @@ -511,6 +524,10 @@ class _BaseScaffoldState extends ConsumerState { child: Text( AppLocalizations.of(context)!.skip, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Colors.white, fontSize: 14, ), @@ -538,7 +555,12 @@ class _BaseScaffoldState extends ConsumerState { ), const SizedBox(width: 10), ElevatedButton( - onPressed: () { + onPressed: () async { + final prefs = await SharedPreferences.getInstance(); + String? loginCount = prefs.getString('login_count'); + if (loginCount == '1') { + await prefs.setString('login_count', '2'); + } debugPrint('Got it clicked'); ref .read(chartsTourProvider.notifier) @@ -572,6 +594,10 @@ class _BaseScaffoldState extends ConsumerState { child: Text( AppLocalizations.of(context)!.got_it, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Color(0xFF7DAFBC), fontSize: 14, ), @@ -737,7 +763,10 @@ class _BaseScaffoldState extends ConsumerState { style: TextStyle( color: widget.colorChange ? Colors.white : Color(0xFF414042), fontSize: 22, - fontFamily: 'Roboto', + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontWeight: FontWeight.w500, ), child: widget.title, @@ -930,7 +959,12 @@ class _BaseScaffoldState extends ConsumerState { 0.6, // Adjust width as needed child: Text( userEmail ?? 'Loading...', - style: TextStyle(fontSize: 12), + style: TextStyle(fontSize: 12, + + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), // softWrap: true, overflow: TextOverflow.ellipsis, maxLines: 1, @@ -950,7 +984,13 @@ class _BaseScaffoldState extends ConsumerState { if (userId != 'guest') ListTile( leading: Icon(Icons.notifications_none), - title: Text(AppLocalizations.of(context)!.notification), + title: Text(AppLocalizations.of(context)!.notification, + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), + ), onTap: () => _navigateTo(context, '/notification'), ), ListTile( @@ -962,7 +1002,12 @@ class _BaseScaffoldState extends ConsumerState { // height: 20, // ), // title: const Text('Feedback'), - title: Text(AppLocalizations.of(context)!.feedback_title), + title: Text(AppLocalizations.of(context)!.feedback_title, + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ),), onTap: () => _navigateTo(context, '/feedback', extra: userName), ), @@ -978,6 +1023,11 @@ class _BaseScaffoldState extends ConsumerState { // title: Text('Manage User'), title: Text( AppLocalizations.of(context)!.manage_user, + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), ), onTap: () => _navigateTo(context, '/manageuser'), ), @@ -986,6 +1036,11 @@ class _BaseScaffoldState extends ConsumerState { // title: const Text('Bookmark'), title: Text( AppLocalizations.of(context)!.bookmark_title, + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), ), onTap: () => _navigateTo(context, '/bookmark'), ), @@ -998,33 +1053,62 @@ class _BaseScaffoldState extends ConsumerState { // height: 20, // ), // title: const Text('User Guide'), - title: Text(AppLocalizations.of(context)!.guide_title), + title: Text(AppLocalizations.of(context)!.guide_title, + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), + ), onTap: () => _navigateTo(context, '/user-guide'), ), ListTile( leading: Icon(Icons.mail_outlined), - title: Text(context.translate('Contact Us', 'اتصل بنا'),), + title: Text(context.translate('Contact Us', 'اتصل بنا'), + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ),), onTap: () => context.go('/contact'), ), if (userId != 'guest') ListTile( leading: Icon(Icons.logout), // title: const Text('Logout'), - title: Text(AppLocalizations.of(context)!.logout), + title: Text(AppLocalizations.of(context)!.logout, + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), + ), onTap: () => _showLogoutConfirmationDialog(context), ), if (userId == 'guest') ListTile( leading: Icon(Icons.login), // title: const Text('Login'), - title: Text(AppLocalizations.of(context)!.login_title), + title: Text(AppLocalizations.of(context)!.login_title, + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), + ), onTap: () => context.go('/login'), ), if (userId == 'guest') ListTile( leading: Icon(Icons.app_registration), // title: const Text('Register'), - title: Text(AppLocalizations.of(context)!.register_title), + title: Text(AppLocalizations.of(context)!.register_title, + style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), ), + ), onTap: () => context.go('/register'), ), ], @@ -1134,9 +1218,17 @@ class _BaseScaffoldState extends ConsumerState { selectedItemColor: Colors.black, unselectedItemColor: Colors.grey, selectedLabelStyle: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 10, // Font size for unselected label ), unselectedLabelStyle: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 10, // Font size for unselected label ), showUnselectedLabels: true, @@ -1207,7 +1299,10 @@ void _showLogoutConfirmationDialog(BuildContext context) { title: Text( context.translate('Log Out Confirmation', 'تأكيد تسجيل الخروج'), textAlign: TextAlign.center, - style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), ), content: Padding( padding: const EdgeInsets.all(20.0), @@ -1216,6 +1311,10 @@ void _showLogoutConfirmationDialog(BuildContext context) { 'هل أنت متأكد أنك تريد تسجيل الخروج؟'), textAlign: TextAlign.center, style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), fontSize: 18, color: Color(0xFF898C81), ), @@ -1243,6 +1342,10 @@ void _showLogoutConfirmationDialog(BuildContext context) { child: Text( context.translate('Cancel', 'إلغاء'), style: TextStyle( + fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ), color: Color(0xFFAA8E83), fontSize: 16, ), @@ -1267,7 +1370,10 @@ void _showLogoutConfirmationDialog(BuildContext context) { .scaleDown, // Prevents wrapping while adjusting text size child: Text( context.translate('Log Out', 'تسجيل الخروج'), - style: TextStyle(color: Colors.white, fontSize: 16), + style: TextStyle(color: Colors.white, fontSize: 16, fontFamily: context.translate( + 'Roboto', + 'NotoKufi', + ),), textAlign: TextAlign.center, ), ), diff --git a/pubspec.lock b/pubspec.lock index bd37164e..18072576 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -93,18 +93,18 @@ packages: dependency: transitive description: name: async - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.12.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.1" boxy: dependency: "direct main" description: @@ -181,10 +181,10 @@ packages: dependency: transitive description: name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.3.0" checked_yaml: dependency: transitive description: @@ -213,10 +213,10 @@ packages: dependency: transitive description: name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.1" code_builder: dependency: transitive description: @@ -229,10 +229,10 @@ packages: dependency: transitive description: name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.19.1" + version: "1.19.0" community_charts_common: dependency: transitive description: @@ -428,10 +428,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.3.1" fast_immutable_collections: dependency: "direct main" description: @@ -976,18 +976,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -1032,10 +1032,10 @@ packages: dependency: transitive description: name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.17" + version: "0.12.16+1" material_charts: dependency: "direct main" description: @@ -1056,10 +1056,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.15.0" mime: dependency: transitive description: @@ -1112,10 +1112,10 @@ packages: dependency: transitive description: name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.9.0" path_parsing: dependency: transitive description: @@ -1435,10 +1435,10 @@ packages: dependency: transitive description: name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.10.1" + version: "1.10.0" sprintf: dependency: transitive description: @@ -1451,10 +1451,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.12.1" + version: "1.12.0" state_notifier: dependency: transitive description: @@ -1467,10 +1467,10 @@ packages: dependency: transitive description: name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -1483,26 +1483,26 @@ packages: dependency: transitive description: name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.3.0" term_glyph: dependency: transitive description: name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.3" the_validator: dependency: "direct main" description: @@ -1691,10 +1691,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.3.1" + version: "14.3.0" watcher: dependency: transitive description: @@ -1792,5 +1792,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.6.0 <4.0.0" flutter: ">=3.27.0"