From 94bc683c67e11f1ea82d595d28f323bb0b56004b Mon Sep 17 00:00:00 2001 From: venbaittech Date: Fri, 14 Feb 2025 09:19:47 +0530 Subject: [PATCH 1/3] filter image change --- android/app/build.gradle | 4 ++-- assets/icons/{misc => uae_numbers}/filters.png | Bin pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename assets/icons/{misc => uae_numbers}/filters.png (100%) diff --git a/android/app/build.gradle b/android/app/build.gradle index d346046c..bc59d713 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -15,12 +15,12 @@ if (localPropertiesFile.exists()) { def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { - flutterVersionCode = "14" + flutterVersionCode = "16" } def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = "1.0.13" + flutterVersionName = "1.0.15" } def keystorePropertiesFile = rootProject.file("key.properties") diff --git a/assets/icons/misc/filters.png b/assets/icons/uae_numbers/filters.png similarity index 100% rename from assets/icons/misc/filters.png rename to assets/icons/uae_numbers/filters.png diff --git a/pubspec.yaml b/pubspec.yaml index 24cec09b..956f8eca 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: uae_stat description: "View statistics about the UAE from the Federal Center for Statistics and Competitiveness." publish_to: "none" -version: 1.0.13+14 +version: 1.0.15+16 environment: sdk: ">=3.2.3 <4.0.0" From dafc089ae9fba86cb7a22d10d3edc3b29246f0f3 Mon Sep 17 00:00:00 2001 From: venbaittech Date: Fri, 14 Feb 2025 09:30:01 +0530 Subject: [PATCH 2/3] chart bug fix --- .../Screens/charts/widgets/chart_widget.dart | 124 ++++++++++++++++-- 1 file changed, 111 insertions(+), 13 deletions(-) diff --git a/lib/presentation/Screens/charts/widgets/chart_widget.dart b/lib/presentation/Screens/charts/widgets/chart_widget.dart index 9a9b4553..d27c4c88 100644 --- a/lib/presentation/Screens/charts/widgets/chart_widget.dart +++ b/lib/presentation/Screens/charts/widgets/chart_widget.dart @@ -1,6 +1,7 @@ import 'dart:math'; import 'package:fl_chart/fl_chart.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; // import 'package:syncfusion_flutter_charts/charts.dart'; @@ -259,16 +260,24 @@ class ChartWidget extends StatelessWidget { }, ), ), - SizedBox(height: 20), - Padding( - padding: - const EdgeInsets.all(8.0), // Add spacing around indicators + SizedBox(height: 25), + + Flexible( + child: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + constraints: BoxConstraints(minHeight: 5), // Allow dynamic height + child: Padding( + padding: const EdgeInsets.only(left: 8.0 ,right: 8.0,bottom: 8.0,top:20.0), child: Wrap( spacing: 12, runSpacing: 8, children: generateIndicators(chartData, chartData['group_by']), ), ), + ), + ), + ), ], ); case 'fl_stacked_bar': @@ -912,19 +921,27 @@ class ChartWidget extends StatelessWidget { return Padding( padding: const EdgeInsets.only(top: 8.0), child: Transform.rotate( - angle: -45 * - (3.1415927 / 180), // Rotating by -45 degrees + angle: -1.58, + // angle: -45 * + // (3.1415927 / 180), // Rotating by -45 degrees alignment: Alignment.center, - child: Text( - xAxisData[value.toInt()], - style: TextStyle(fontSize: 12), + child: Center( + child: SizedBox( + width: 100, + child: Text( + xAxisData[value.toInt()], + style: const TextStyle(fontSize: 12), + softWrap: true, + maxLines: 2, + ), + ), ), ), ); } return Container(); }, - reservedSize: 60, + reservedSize: 85, ), ), topTitles: AxisTitles( @@ -979,6 +996,16 @@ class ChartWidget extends StatelessWidget { } else if (chartData['dataset'] == 'labour_force') { crop = item['ObsKey']['GENDER']; cropType = item['ObsKey'][groupByKey]; + } else if (chartData['dataset'] == 'clinics') { + + if (kDebugMode) { + print('forclinics'); + print('ObsKey: ${item['ObsKey']}'); + // print('NR_TYPE: ${item['ObsKey']?['NR_TYPE']}'); + } + + crop = item['ObsKey']['MEASURE']; + cropType = item['ObsKey'][groupByKey]; } else { crop = item['ObsKey']['CROP']; cropType = item['ObsKey'][groupByKey]; @@ -1169,7 +1196,52 @@ class ChartWidget extends StatelessWidget { if (chartData['dataset'] == 'natural_reserves') { crop = item['ObsKey']['NR_TYPE']; cropType = item['ObsKey'][groupByKey]; - } else { + } + else if(chartData['dataset'] == 'gdp') + { + print("ForGDP"); + if (kDebugMode) { + + print('ObsKey: ${item['ObsKey']}'); + // print('NR_TYPE: ${item['ObsKey']?['NR_TYPE']}'); + } + crop = item['ObsKey']['BOP_ITEM']; + + cropType = item['ObsKey'][groupByKey]; + } else if(chartData['dataset'] == 'air_transport') + { + print("Forair_transport"); + if (kDebugMode) { + + print('ObsKey: ${item['ObsKey']}'); + // print('NR_TYPE: ${item['ObsKey']?['NR_TYPE']}'); + } + crop = item['ObsKey']['MEASURE']; + + cropType = item['ObsKey'][groupByKey]; + } else if(chartData['dataset'] == 'import') + { + print("Forimport"); + if (kDebugMode) { + + print('ObsKey: ${item['ObsKey']}'); + // print('NR_TYPE: ${item['ObsKey']?['NR_TYPE']}'); + } + crop = item['ObsKey']['COUNTRY']; + + cropType = item['ObsKey'][groupByKey]; + } + else if(chartData['dataset'] == 'gdpq') + { + print("ForGDPq"); + if (kDebugMode) { + print('ObsKey: ${item['ObsKey']}'); + } + crop = item['ObsKey']['MEASURE']; + // crop = item['ObsKey']['TIME_PERIOD']; + cropType = item['ObsKey'][groupByKey]; + } + else { crop = item['ObsKey']['CROP']; cropType = item['ObsKey'][groupByKey]; } @@ -1184,6 +1256,18 @@ class ChartWidget extends StatelessWidget { int rotationTurns = 1; print('Grouped Crops: $groupedCrops'); + + int numberOfBars = groupedCrops.length; // Number of grouped sets (bar groups) + double barHeight = 40.0; // Height per individual bar + double barSpacing = 30.0; // Space between bar sets + double minHeight = 300.0; // Minimum chart height + double maxHeight = 1000.0; // Maximum chart height + +// Calculate total height dynamically + double chartHeight = ((numberOfBars * barHeight) + ((numberOfBars - 1) * barSpacing)) + .clamp(minHeight, maxHeight); + + return Column(children: [ Text( chartData['chart_heading'] ?? '', // Chart title from data @@ -1196,6 +1280,13 @@ class ChartWidget extends StatelessWidget { SizedBox(height: 10), // Chart Expanded( + child: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child:SizedBox( + width: 1000, + height: chartHeight, child: BarChart( BarChartData( maxY: 400000, @@ -1347,7 +1438,9 @@ class ChartWidget extends StatelessWidget { alignment: BarChartAlignment.spaceAround, ), ), - ) + ), + ), + )), // Expanded( // child: Stack( // children:[ @@ -2013,7 +2106,12 @@ class ChartWidget extends StatelessWidget { ]; final barColor; if (chartData['dataset'] == 'general_education' || - chartData['dataset'] == 'higher_education') { + chartData['dataset'] == 'higher_education' || + chartData['dataset'] == 'air_transport' || + chartData['dataset'] == 'labour_force' || + chartData['dataset'] == 'gdp' + ) { + barColor = uniqueColorsForTwo[colorIndex % uniqueColorsForTwo.length]; colorIndex++; } else { From 21c4525db311552356ac3c999f15efbdbb2bb21a Mon Sep 17 00:00:00 2001 From: Kalonkarthik Date: Fri, 14 Feb 2025 16:14:22 +0530 Subject: [PATCH 3/3] Back button UserGuide,and open project bux fix --- assets/icons/uae_numbers/share.svg | 3 + .../icons/uae_numbers_asset_path.dart | 7 +- .../UAE_Numbers/uae_numbers.dart | 2 +- .../auth_verification/create_new_pw.dart | 40 +- .../auth_verification/privacy_policy.dart | 1 + .../auth_verification/registration.dart | 1777 +++++++++-------- .../auth_verification/terms&conditions.dart | 1 + .../Screens/charts/screens/chart_screen.dart | 48 +- lib/presentation/Screens/profilepage.dart | 171 +- .../routes/auth_routes/login_route.dart | 4 +- .../tab_routes/home_route.dart | 2 +- .../user_guide/AboutTheApp/AboutFCSC.dart | 1 + .../user_guide/AboutTheApp/getStarted.dart | 1 + .../user_guide/KeyFeatures/AppFeatures.dart | 1 + .../KeyFeatures/ChangeMyPassword.dart | 1 + .../user_guide/KeyFeatures/EditMyProfile.dart | 1 + .../user_guide/KeyFeatures/howUseTheApp.dart | 1 + .../user_guide/KeyFeatures/purpose.dart | 1 + .../user_guide/KeyFeatures/stayUpdate.dart | 1 + .../user_guide/KeyFeatures/useTheApp.dart | 1 + .../Drawer Items/user_guide/aboutApp.dart | 1 + .../Drawer Items/user_guide/faq_page.dart | 1 + .../Drawer Items/user_guide/features.dart | 1 + .../drawer_routes/custom_drawer_routes.dart | 15 +- pubspec.lock | 2 +- pubspec.yaml | 2 + 26 files changed, 1082 insertions(+), 1005 deletions(-) create mode 100644 assets/icons/uae_numbers/share.svg diff --git a/assets/icons/uae_numbers/share.svg b/assets/icons/uae_numbers/share.svg new file mode 100644 index 00000000..cb440dcd --- /dev/null +++ b/assets/icons/uae_numbers/share.svg @@ -0,0 +1,3 @@ + + + diff --git a/lib/infrastructure/services/img_asset_paths/icons/uae_numbers_asset_path.dart b/lib/infrastructure/services/img_asset_paths/icons/uae_numbers_asset_path.dart index db2e65cd..167127df 100644 --- a/lib/infrastructure/services/img_asset_paths/icons/uae_numbers_asset_path.dart +++ b/lib/infrastructure/services/img_asset_paths/icons/uae_numbers_asset_path.dart @@ -2,8 +2,9 @@ import 'package:flutter/material.dart'; abstract class UaeNumbersAssetPath { static const _basePath = 'assets/icons/uae_numbers'; - static const bookmarksUae = '$_basePath/bookmarks.png'; - static const bookmarksSelectedUae = '$_basePath/bookmarksSelectedUae.png'; - static const shareUae = '$_basePath/share.png'; + // static const bookmarksUae = '$_basePath/bookmarks.png'; + // static const bookmarksSelectedUae = '$_basePath/bookmarksSelectedUae.png'; + // static const shareUae = '$_basePath/share.png'; + static const share = '$_basePath/share.svg'; static const filterUae = '$_basePath/filters.png'; } 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 5dd763ad..b09a6223 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 @@ -288,7 +288,7 @@ class _UaenumberWidgetState extends ConsumerState { final encodedTitle = Uri.encodeComponent(title); // Pass mainTopic and title as query parameters - context.go( + context.push( '/chartScreen/$data_set?bgColor=$colorPattern&mainTopic=$encodedMainTopic&title=$encodedTitle'); // context.go('/chartScreen/$data_set'); }, diff --git a/lib/presentation/Screens/auth_verification/create_new_pw.dart b/lib/presentation/Screens/auth_verification/create_new_pw.dart index 0bcd7b7d..11da8240 100644 --- a/lib/presentation/Screens/auth_verification/create_new_pw.dart +++ b/lib/presentation/Screens/auth_verification/create_new_pw.dart @@ -14,7 +14,7 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import '../../../config/my_theme.dart'; -class CreateNewPw extends StatefulWidget { +class CreateNewPw extends ConsumerStatefulWidget { final String userId; final String email; final String? keyParam; @@ -22,10 +22,10 @@ class CreateNewPw extends StatefulWidget { const CreateNewPw({Key? key, required this.userId, required this.email, required this.keyParam}); @override - State createState() => _CreateNewPwState(); + ConsumerState createState() => _CreateNewPwState(); } -class _CreateNewPwState extends State { +class _CreateNewPwState extends ConsumerState { final _pb = PocketBase('https://pb.venbait.in'); final _formKey = GlobalKey(); bool _obscureOldPassword = true; @@ -188,9 +188,10 @@ class _CreateNewPwState extends State { } @override - Widget build(BuildContext context) { + Widget build(BuildContext contextx) { double screenHeight = MediaQuery.of(context).size.height; double screenWidth = MediaQuery.of(context).size.width; + final passwordLocale = ref.watch(localeProvider); return Scaffold( backgroundColor: Colors.white, @@ -198,13 +199,14 @@ class _CreateNewPwState extends State { child: SafeArea( child: _isPasswordUpdated ? _buildSuccessContent(screenHeight, screenWidth) - : _buildPasswordForm(screenHeight, screenWidth), + : _buildPasswordForm(ref,screenHeight, screenWidth), ), ), ); } - Widget _buildPasswordForm(double screenHeight, double screenWidth) { + Widget _buildPasswordForm(WidgetRef ref ,double screenHeight, double screenWidth) { + final passwordLocale = ref.watch(localeProvider); return Form( key: _formKey, child: Padding( @@ -231,7 +233,7 @@ class _CreateNewPwState extends State { child: Icon( // Icons.close, Icons.arrow_back_ios, - size: 28, // Icon size + size: 24, // Icon size color: Colors.black, // Icon color ), ), @@ -259,7 +261,10 @@ class _CreateNewPwState extends State { // "Create New Password", AppLocalizations.of(context)!.create_new_password, style: TextStyle( - fontSize: 26, + fontSize: passwordLocale?.languageCode == + 'ar' + ? 24 + :26, fontWeight: FontWeight.w300, ), ), @@ -269,12 +274,18 @@ class _CreateNewPwState extends State { TextSpan( children: [ TextSpan( - text: 'Your New Password Must Be Different\n', - style: TextStyle(fontSize: 15,fontWeight: FontWeight.w700, color: Color(0xFF898C81)), + text: context.translate('Your New Password Must Be Different\n','يجب أن تكون كلمة المرور الجديدة مختلفة\n',), + style: TextStyle(fontSize: passwordLocale?.languageCode == + 'ar' + ? 14 + :15,fontWeight: FontWeight.w700, color: Color(0xFF898C81)), ), TextSpan( - text: 'from Previously Used Password', - style: TextStyle(fontSize: 15, color: Color(0xFF898C81), fontWeight: FontWeight.w700), + text: context.translate('from Previously Used Password','عن كلمة المرور المستخدمة سابقًا'), + style: TextStyle(fontSize: passwordLocale?.languageCode == + 'ar' + ? 14 + :15, color: Color(0xFF898C81), fontWeight: FontWeight.w700), ), ], ), @@ -590,7 +601,10 @@ class _CreateNewPwState extends State { children: [ Text( AppLocalizations.of(context)!.save, - style: TextStyle(fontSize: 18, color: Colors.white), + style: TextStyle(fontSize: passwordLocale?.languageCode == + 'ar' + ? 14 + :18, color: Colors.white), ), SizedBox(width: 2), Icon( diff --git a/lib/presentation/Screens/auth_verification/privacy_policy.dart b/lib/presentation/Screens/auth_verification/privacy_policy.dart index c259e21a..cb4cdc60 100644 --- a/lib/presentation/Screens/auth_verification/privacy_policy.dart +++ b/lib/presentation/Screens/auth_verification/privacy_policy.dart @@ -17,6 +17,7 @@ class PrivacyPolicy extends StatelessWidget { ), child: Scaffold( appBar: AppBar( + scrolledUnderElevation: 0, title:Text(context.translate( 'Privacy Policy', 'الشروط والأحكام', diff --git a/lib/presentation/Screens/auth_verification/registration.dart b/lib/presentation/Screens/auth_verification/registration.dart index d6384345..232e774f 100644 --- a/lib/presentation/Screens/auth_verification/registration.dart +++ b/lib/presentation/Screens/auth_verification/registration.dart @@ -118,7 +118,7 @@ class _RegisterScreenState extends ConsumerState { String? _validateUsername(String? value) { if (value == null || value.isEmpty) { - return 'Required'; + return context.translate('Required', 'مطلوب'); } else if (value.length > 40) { return 'Must not exceed 40 characters'; } else if (!RegExp(r"^[a-zA-Z0-9'\-\u0627\u0639~\u00C0-\u00FF]+$") @@ -136,7 +136,7 @@ class _RegisterScreenState extends ConsumerState { r'^[a-zA-Z0-9àèìòùÀÈÌÒÙéàç~!#$%^&*()_+=-{}|;,.?<>]+@[a-zA-Z0-9àèìòùÀÈÌÒÙéàç~!#$%^&*()_+=-{}|;,.?<>]+\.[a-zA-Z]{2,}$'; if (value == null || value.isEmpty) { - return 'Required'; + return context.translate('Required', 'مطلوب'); } else if (!RegExp(emailRegex).hasMatch(value)) { return 'Invalid Email'; } @@ -155,7 +155,7 @@ class _RegisterScreenState extends ConsumerState { final hasSpecialCharacter = RegExp(r'[~!@#$%^&*()_+=[\]{}|;:,.<>?/-]'); if (value == null || value.isEmpty) { - return 'Required'; + return context.translate('Required', 'مطلوب'); } else if (value.length < 8) { return 'Password must be at least 8characters'; } @@ -201,7 +201,7 @@ class _RegisterScreenState extends ConsumerState { r'^[A-Za-z0-9~!@#$%^&*()_+=[\]{}|;:,.<>?/-àèìòùáéíóúÀÈÌÒÙÁÉÍÓÚ]*$'); if (value == null || value.isEmpty) { - return 'Required'; + return context.translate('Required', 'مطلوب'); } else if (value.length < 8 || value.length > 40) { return 'Password must be at least 8characters'; } else if (!regex.hasMatch(value)) { @@ -359,895 +359,896 @@ class _RegisterScreenState extends ConsumerState { child: SafeArea( child: Scaffold( backgroundColor: Colors.white, - body: Column( - children: [ - Align( - alignment: AlignmentDirectional.topEnd, - child: Padding( - padding: EdgeInsets.only(top: 16.0, right :16.0), - child: Consumer( - builder: (context, ref, _) { - final locale = ref.watch(localeProvider); // Current locale - return MyToggle( - isOn: locale?.languageCode == 'en', - knobTextWhenOn: 'ع', - knobTextWhenOff: 'EN', - pathColorWhenOn: Colors.grey.shade300, - pathColorWhenOff: Colors.grey.shade300, - onTap: () { - ref.read(localeProvider.notifier).toggleLocale(); - }, - ); - }, + body: SingleChildScrollView( + child: Column( + children: [ + Align( + alignment: AlignmentDirectional.topEnd, + child: Padding( + padding: EdgeInsets.only(top: 16.0, right :16.0), + child: Consumer( + builder: (context, ref, _) { + final locale = ref.watch(localeProvider); // Current locale + return MyToggle( + isOn: locale?.languageCode == 'en', + knobTextWhenOn: 'ع', + knobTextWhenOff: 'EN', + pathColorWhenOn: Colors.grey.shade300, + pathColorWhenOff: Colors.grey.shade300, + onTap: () { + ref.read(localeProvider.notifier).toggleLocale(); + }, + ); + }, + ), ), ), - ), - Container( - height: MediaQuery.of(context).size.height / 1.2, - child: SingleChildScrollView( - child: Column(children: [ - registrationSuccess - ? Padding( - padding: const EdgeInsets.all(20.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox(height: screenheight / 4), - buildIconContainer( - Icons.report, Color(0xFF7DAFBC)), - SizedBox(height: 20), - Text( - context.translate( - 'Your registration is pending for verification.', - 'تسجيلك في انتظار التحقق.'), - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Color(0xFF414042)), - ), - SizedBox(height: 10), - Text( - context.translate( - 'Kindly verify your mail to proceed further.', - 'يرجى التحقق من البريد الخاص بك للمضي قدما.'), - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 14, - color: Color(0xFF898C81), - ), - ), - SizedBox(height: 10), - ElevatedButton( - onPressed: () => {context.go('/login')}, - style: ElevatedButton.styleFrom( - backgroundColor: Color(0xFFAA8E83), // Background color - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12), // Border radius - ), - ), - child: Text( - context.translate('Go to Login', 'اذهب إلى تسجيل الدخول'), - style: TextStyle( - color: Colors.white, // Text color - ), - ), - ), - - SizedBox(height: screenheight / 5), - Center( - child: Container( - height: screenheight / 16, - width: screenwidth / 2.5, - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage( - "assets/splash_screen/logo.png"), // Background image asset - fit: BoxFit.fill, - ), - ), - )) - ], + Column(children: [ + registrationSuccess + ? Padding( + padding: const EdgeInsets.all(20.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: screenheight / 4), + buildIconContainer( + Icons.report, Color(0xFF7DAFBC)), + SizedBox(height: 20), + Text( + context.translate( + 'Your registration is pending for verification.', + 'تسجيلك في انتظار التحقق.'), + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Color(0xFF414042)), + ), + SizedBox(height: 10), + Text( + context.translate( + 'Kindly verify your mail to proceed further.', + 'يرجى التحقق من البريد الخاص بك للمضي قدما.'), + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 14, + color: Color(0xFF898C81), + ), + ), + SizedBox(height: 10), + ElevatedButton( + onPressed: () => {context.go('/login')}, + style: ElevatedButton.styleFrom( + backgroundColor: Color(0xFFAA8E83), // Background color + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), // Border radius ), - ) - : registrationFailed - ? Padding( - padding: const EdgeInsets.all(20.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox(height: screenheight / 8), - buildIconContainer(Icons.report, Colors.red), - SizedBox(height: 20), - Text( - context.translate( - 'Sorry ${_usernameController.text}!', - 'آسف ${_usernameController.text}!'), - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - color: Color(0xFF414042)), - ), - SizedBox(height: 10), - Text( - context.translate( - 'Your registration process failed. For further assistance, please contact support.', - 'فشلت عملية التسجيل الخاصة بك. لمزيد من المساعدة، يرجى الاتصال بالدعم.'), - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 14, - color: Color(0xFF898C81), - ), - ), - SizedBox(height: 10), - ElevatedButton( - onPressed: () => { - setState(() { - registrationFailed = false; - registrationSuccess = false; - _usernameController.clear(); - _emailController.clear(); - _passwordController.clear(); - _confirmpasswordController.clear(); - isChecked = false; - }) - }, - child: Text( - context.translate( - 'Retry', 'أعد المحاولة'), - ), - ), - SizedBox(height: screenheight / 5), - Center( - child: Container( - height: screenheight / 16, - width: screenwidth / 2.5, - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage( - "assets/splash_screen/logo.png"), // Background image asset - fit: BoxFit.fill, - ), - ), - )) - ], - ), - ) - : Form( - key: _formKey, - child: SingleChildScrollView( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox(height: screenheight / 60), - Text( - // 'Register', - AppLocalizations.of(context)! - .register_title, - style: TextStyle( - fontSize: 32, - fontWeight: FontWeight.w400), - ), - SizedBox(height: 10), - Text(AppLocalizations.of(context)! - .register_details, - style: TextStyle( - fontSize: context.translate(18.0, 14.0), - color: const Color(0xff898C81), - fontWeight: FontWeight.w600, - ), - ), - - SizedBox(height: 20), - // Display this if registration is pending approval - Padding( - padding: const EdgeInsets.only( - top: 5.0, - bottom: 10, - left: 30, - right: 30), - child: TextFormField( - controller: _usernameController, - // focusNode: _focusNodes[0], - decoration: InputDecoration( - // hintText: _showHints[0] ? 'Username' : null, - hintText: _showHints[0] - ? AppLocalizations.of(context)! - .register_name - : null, - prefixIconConstraints: - const BoxConstraints( - maxWidth: 25 + 16 + 10, - maxHeight: 25 + (8 * 2), - ), - prefixIcon: Padding( - padding: const EdgeInsetsDirectional - .only( - start: 16, - end: 10, - ), - child: Image.asset( - MiscIconAssetPath.person, - fit: BoxFit.fitHeight, - height: 25, - width: 25, - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade300, - ), - ), - - // prefixIcon: Icon( - // Icons.person, - // color: Color(0xFF90B0D5), - // - // ), - // border: OutlineInputBorder(), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade400, - width: 1), // Enabled border - ), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Colors.deepPurple, - width: 2), // Focused border - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Error border - ), - focusedErrorBorder: - OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: - 1), // Match the error color - ), - counterText: '', - hintStyle: TextStyle( - color: Color(0xFFC3C6CB), - fontSize: - registerLocale?.languageCode == - 'ar' - ? 14 - : 16, - ), - ), - validator: _validateUsername, - maxLength: - 40, // Set the maximum length to 20 characters - maxLengthEnforcement: - MaxLengthEnforcement.enforced, - ), - ), - SizedBox(height: 15), - Padding( - padding: const EdgeInsets.only( - top: 5.0, - bottom: 10, - left: 30, - right: 30), - child: TextFormField( - controller: _emailController, - // focusNode: _focusNodes[1], - decoration: InputDecoration( - // hintText: 'Enter your email', - hintText: _showHints[1] - ? AppLocalizations.of(context)! - .enter_your_email - : null, - // _showHints[1] ? 'Enter your email' : null, - prefixIconConstraints: - const BoxConstraints( - maxWidth: 25 + 16 + 10, - maxHeight: 25 + (8 * 2), - ), - prefixIcon: Padding( - padding: const EdgeInsetsDirectional - .only( - start: 16, - end: 10, - ), - child: Image.asset( - MiscIconAssetPath.vector, - fit: BoxFit.fitHeight, - height: 20, - width: 25, - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade100, - ), - ), - - // border: OutlineInputBorder(), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade400, - width: 1), - ), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Colors.deepPurple, - width: 2), // Focused border - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Error border - ), - focusedErrorBorder: - OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: - 1), // Match the error color - ), - counterText: '', - hintStyle: TextStyle( - color: Color(0xFFC3C6CB), - fontSize: - registerLocale?.languageCode == - 'ar' - ? 14 - : 16, - ), - ), - validator: _validateEmail, - maxLength: 320, - maxLengthEnforcement: - MaxLengthEnforcement.enforced, - inputFormatters: [ - LengthLimitingTextInputFormatter( - 320), // Limit to 320 characters - ], - ), - ), - SizedBox(height: 15), - Padding( - padding: const EdgeInsets.only( - top: 5.0, - bottom: 10, - left: 30, - right: 30), - child: TextFormField( - controller: _passwordController, - // focusNode: _focusNodes[2], - obscureText: _obscurePassword, - decoration: InputDecoration( - hintText: _showHints[2] - ? AppLocalizations.of(context)! - .enter_your_password - : null, - // _showHints[2] ? 'Enter your password' : null, - prefixIconConstraints: - const BoxConstraints( - maxWidth: 25 + 16 + 10, - maxHeight: 25 + (8 * 2), - ), - prefixIcon: Padding( - padding: const EdgeInsetsDirectional - .only( - start: 16, - end: 10, - ), - child: Image.asset( - MiscIconAssetPath.lock, - fit: BoxFit.fitHeight, - height: 25, - width: 25, - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade300, - ), - ), - - // prefixIcon: Icon( - // Icons.lock, - // color: Color(0xFF90B0D5), - // ), - suffixIcon: IconButton( - // icon: Icon( - // _obscurePassword - // ? Icons.visibility_off - // : Icons.visibility, - // color: Color(0xFF9EA2A9), - // ), - - icon: Image.asset( - _obscurePassword - ? MiscIconAssetPath - .visibilityOff - : MiscIconAssetPath.visibleOn, - - color: Color( - 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly. - width: 24, - height: 24, - ), - - onPressed: () { - setState(() { - _obscurePassword = - !_obscurePassword; - }); - }, - ), - // border: OutlineInputBorder(), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade400, - width: 1), - ), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Colors.deepPurple, - width: 2), // Focused border - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Error border - ), - focusedErrorBorder: - OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: - 1), // Match the error color - ), - - counterText: '', - hintStyle: TextStyle( - color: Color(0xFFC3C6CB), - fontSize: - registerLocale?.languageCode == - 'ar' - ? 14 - : 16, - ), - ), - validator: _validatePassword, - maxLength: 40, - maxLengthEnforcement: - MaxLengthEnforcement.enforced, - ), - ), - SizedBox(height: 15), - Padding( - padding: const EdgeInsets.only( - top: 5.0, - bottom: 10, - left: 30, - right: 30), - child: TextFormField( - controller: _confirmpasswordController, - // focusNode: _focusNodes[3], - obscureText: _obscureConfirmPassword, - decoration: InputDecoration( - hintText: _showHints[3] - ? AppLocalizations.of(context)! - .register_Confirm_password - : null, - // _showHints[3] ? 'Confirm password' : null, - prefixIconConstraints: - const BoxConstraints( - maxWidth: 25 + 16 + 10, - maxHeight: 25 + (8 * 2), - ), - prefixIcon: Padding( - padding: const EdgeInsetsDirectional - .only( - start: 16, - end: 10, - ), - child: Image.asset( - MiscIconAssetPath.lock, - fit: BoxFit.fitHeight, - height: 25, - width: 25, - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade300, - ), - ), - - suffixIcon: IconButton( - icon: Image.asset( - _obscureConfirmPassword - ? MiscIconAssetPath - .visibilityOff - : MiscIconAssetPath.visibleOn, - - color: Color( - 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly. - width: 24, - height: 24, - ), - onPressed: () { - setState(() { - _obscureConfirmPassword = - !_obscureConfirmPassword; - }); - }, - ), - // border: OutlineInputBorder( - // borderSide: BorderSide(color: Colors.blue, width: 2), // Default border color - // ), - enabledBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: MyTheme.topicColor( - IndicatorTopic.economy) - .shade400, - width: 1), - ), - focusedBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Colors.deepPurple, - width: 2), // Focused border - ), - errorBorder: OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: 1), // Error border - ), - focusedErrorBorder: - OutlineInputBorder( - borderRadius: - BorderRadius.circular(10), - borderSide: BorderSide( - color: Color(0xFFb22222), - width: - 1), // Match the error color - ), - counterText: '', - hintStyle: TextStyle( - color: Color(0xFFC3C6CB), - fontSize: - registerLocale?.languageCode == - 'ar' - ? 14 - : 16, - ), - ), - validator: _validateConfirmPassword, - maxLength: 40, - maxLengthEnforcement: - MaxLengthEnforcement.enforced, - inputFormatters: [ - LengthLimitingTextInputFormatter( - 64), // Limit to 40 characters - ], - ), - ), - SizedBox(height: 10), - Padding( - padding: const EdgeInsets.only( - top: 0, - bottom: 10, - left: 25, - right: 30), - child: Row( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Checkbox( - value: isChecked, - onChanged: (value) { - setState(() { - isChecked = value ?? false; - showError = false; - }); - }, - side: BorderSide( - color: showError - ? Color(0xFFb22222) - : MyTheme.topicColor( - IndicatorTopic.economy) - .shade400, - width: 1, - ), - ), - Expanded( - child: Padding( - padding: const EdgeInsets.only( - top: 13.0), - child: Text.rich( - TextSpan( - text: AppLocalizations.of( - context)! - .agree, - // text: 'I agree to ', - style: TextStyle( - fontWeight: FontWeight.w500, - fontSize: registerLocale - ?.languageCode == - 'ar' - ? 12 - : 14, - color: Color( - 0xFF898C81,), // Change to your desired color - ), - children: [ - TextSpan( - recognizer:TapGestureRecognizer() - ..onTap = () => context.push('/terms&conditions'), - text: AppLocalizations.of( - context)! - .terms_conditions, - // text: 'Terms & Conditions', - style: TextStyle( - fontSize: registerLocale - ?.languageCode == - 'ar' - ? 12 - : 14, - fontWeight: - FontWeight.bold, - color: - Color(0xFF985400), - // Makes the text bold - // decoration: - // TextDecoration.underline, - decorationColor: - Color(0xFF985400), - decorationThickness: - 1), - ), - TextSpan( - text: AppLocalizations.of( - context)! - .t_and, - style: TextStyle( - color: Color( - 0xFF898C81), // Change to your desired color - ), - ), - TextSpan( - recognizer: TapGestureRecognizer() - ..onTap = () => context.push('/privacy_policy'), - text: AppLocalizations.of( - context)! - .privacy_policy, - style: TextStyle( - fontWeight: - FontWeight.bold, - fontSize: registerLocale - ?.languageCode == - 'ar' - ? 12 - : 14, - fontFamily: 'Roboto', - color: - Color(0xFF985400), - // decoration: - // TextDecoration.underline, - decorationColor: - Color(0xFF648CBA), - decorationThickness: - 1), - ), - TextSpan( - text: AppLocalizations.of( - context)! - .conditions, - style: TextStyle( - fontWeight: FontWeight.w500, - fontSize: registerLocale - ?.languageCode == - 'ar' - ? 12 - : 14, - color: Color( - 0xFF898C81), // Change to your desired color - ), - ), - ], - ), - ), - ), - ), - ], - ), - ), - if (showError) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - left:registerLocale - ?.languageCode == - 'ar' - ? 0 - : 30.0, - right: registerLocale - ?.languageCode == - 'ar' - ? 30 - : 0.0,), - child: Text( - 'Required', - style: TextStyle( - color: Color(0xFFb22222), - fontSize: registerLocale - ?.languageCode == - 'ar' - ? 12 - : 12, - ), - ), - ), - ], - ), - SizedBox(height: 20), - Padding( - padding: const EdgeInsets.only( - top: 5.0, - bottom: 10, - left: 30, - right: 30), - child: SizedBox( - width: screenwidth / 1, - child: ElevatedButton( - onPressed: isRegistering - ? null - : _registerUser, - style: ElevatedButton.styleFrom( - backgroundColor: Color( - 0xFFA7887A), // Brownish color for Register - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(10), - ), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - // "Register", - AppLocalizations.of(context)! - .register_title, - style: TextStyle( - fontSize: registerLocale - ?.languageCode == - 'ar' - ? 14 - : 16, - color: Colors.white), - ), - SizedBox(width: 8), - const Icon( - Icons.chevron_right_outlined, - color: Colors - .white, // Set your desired color here - ) - ], - ), - ), - ), - ), - SizedBox(height: 15), - Text( - AppLocalizations.of(context)! - .account_confirmation, - style: TextStyle( - fontWeight: FontWeight.w500, - fontSize: - registerLocale?.languageCode == - 'ar' - ? 12 - : 14, - color: Color(0xFF898C81), - ), - ), - SizedBox(height: 15), - Padding( - padding: const EdgeInsets.only( - top: 5.0, - bottom: 10, - left: 30, - right: 30), - child: SizedBox( - width: screenwidth / 1, - child: ElevatedButton( - onPressed: () { - context.pop(); - }, - style: ElevatedButton.styleFrom( - backgroundColor: Color( - 0xFF82AFCB), // Blueish color for Login - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(10), - ), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - AppLocalizations.of(context)! - .login_title, - style: TextStyle( - fontSize: 16, - color: Colors.white), - ), - SizedBox(width: 8), - const Icon( - Icons.chevron_right_outlined, - color: Colors - .white, // Set your desired color here - ) - ], - ), - ), - ), - ), - SizedBox( - height: 10, - ), - Center( - child: Container( - height: screenheight / 16, - width: screenwidth / 3, - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage( - "assets/splash_screen/logo.png"), // Background image asset - fit: BoxFit.fill, - ), - ), - )), - SizedBox( - height: 20, - ), - ], - ), + ), + child: Text( + context.translate('Go to Login', 'اذهب إلى تسجيل الدخول'), + style: TextStyle( + color: Colors.white, // Text color + ), + ), + ), + + SizedBox(height: screenheight / 5), + Center( + child: Container( + height: screenheight / 16, + width: screenwidth / 2.5, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + "assets/splash_screen/logo.png"), // Background image asset + fit: BoxFit.fill, ), ), - ]), - ), - ), - ], + )) + ], + ), + ) + : registrationFailed + ? Padding( + padding: const EdgeInsets.all(20.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: screenheight / 8), + buildIconContainer(Icons.report, Colors.red), + SizedBox(height: 20), + Text( + context.translate( + 'Sorry ${_usernameController.text}!', + 'آسف ${_usernameController.text}!'), + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w500, + color: Color(0xFF414042)), + ), + SizedBox(height: 10), + Text( + context.translate( + 'Your registration process failed. For further assistance, please contact support.', + 'فشلت عملية التسجيل الخاصة بك. لمزيد من المساعدة، يرجى الاتصال بالدعم.'), + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 14, + color: Color(0xFF898C81), + ), + ), + SizedBox(height: 10), + ElevatedButton( + onPressed: () => { + setState(() { + registrationFailed = false; + registrationSuccess = false; + _usernameController.clear(); + _emailController.clear(); + _passwordController.clear(); + _confirmpasswordController.clear(); + isChecked = false; + }) + }, + child: Text( + context.translate( + 'Retry', 'أعد المحاولة'), + ), + ), + SizedBox(height: screenheight / 5), + Center( + child: Container( + height: screenheight / 16, + width: screenwidth / 2.5, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + "assets/splash_screen/logo.png"), // Background image asset + fit: BoxFit.fill, + ), + ), + )) + ], + ), + ) + : Form( + key: _formKey, + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: screenheight / 60), + Text( + // 'Register', + AppLocalizations.of(context)! + .register_title, + style: TextStyle( + fontSize: 32, + fontWeight: FontWeight.w400), + ), + SizedBox(height: 10), + Text(AppLocalizations.of(context)! + .register_details, + style: TextStyle( + fontSize: context.translate(18.0, 14.0), + color: const Color(0xff898C81), + fontWeight: FontWeight.w600, + ), + ), + + SizedBox(height: 20), + // Display this if registration is pending approval + Padding( + padding: const EdgeInsets.only( + top: 5.0, + bottom: 10, + left: 30, + right: 30), + child: TextFormField( + controller: _usernameController, + // focusNode: _focusNodes[0], + decoration: InputDecoration( + // hintText: _showHints[0] ? 'Username' : null, + hintText: _showHints[0] + ? AppLocalizations.of(context)! + .register_name + : null, + prefixIconConstraints: + const BoxConstraints( + maxWidth: 25 + 16 + 10, + maxHeight: 25 + (8 * 2), + ), + prefixIcon: Padding( + padding: const EdgeInsetsDirectional + .only( + start: 16, + end: 10, + ), + child: Image.asset( + MiscIconAssetPath.person, + fit: BoxFit.fitHeight, + height: 25, + width: 25, + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade300, + ), + ), + + // prefixIcon: Icon( + // Icons.person, + // color: Color(0xFF90B0D5), + // + // ), + // border: OutlineInputBorder(), + enabledBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade400, + width: 1), // Enabled border + ), + focusedBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Colors.deepPurple, + width: 2), // Focused border + ), + errorBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Error border + ), + focusedErrorBorder: + OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: + 1), // Match the error color + ), + counterText: '', + hintStyle: TextStyle( + color: Color(0xFFC3C6CB), + fontSize: + registerLocale?.languageCode == + 'ar' + ? 14 + : 16, + ), + ), + validator: _validateUsername, + maxLength: + 40, // Set the maximum length to 20 characters + maxLengthEnforcement: + MaxLengthEnforcement.enforced, + ), + ), + SizedBox(height: 15), + Padding( + padding: const EdgeInsets.only( + top: 5.0, + bottom: 10, + left: 30, + right: 30), + child: TextFormField( + controller: _emailController, + // focusNode: _focusNodes[1], + decoration: InputDecoration( + // hintText: 'Enter your email', + hintText: _showHints[1] + ? AppLocalizations.of(context)! + .enter_your_email + : null, + // _showHints[1] ? 'Enter your email' : null, + prefixIconConstraints: + const BoxConstraints( + maxWidth: 25 + 16 + 10, + maxHeight: 25 + (8 * 2), + ), + prefixIcon: Padding( + padding: const EdgeInsetsDirectional + .only( + start: 16, + end: 10, + ), + child: Image.asset( + MiscIconAssetPath.vector, + fit: BoxFit.fitHeight, + height: 20, + width: 25, + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade100, + ), + ), + + // border: OutlineInputBorder(), + enabledBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade400, + width: 1), + ), + focusedBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Colors.deepPurple, + width: 2), // Focused border + ), + errorBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Error border + ), + focusedErrorBorder: + OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: + 1), // Match the error color + ), + counterText: '', + hintStyle: TextStyle( + color: Color(0xFFC3C6CB), + fontSize: + registerLocale?.languageCode == + 'ar' + ? 14 + : 16, + ), + ), + validator: _validateEmail, + maxLength: 320, + maxLengthEnforcement: + MaxLengthEnforcement.enforced, + inputFormatters: [ + LengthLimitingTextInputFormatter( + 320), // Limit to 320 characters + ], + ), + ), + SizedBox(height: 15), + Padding( + padding: const EdgeInsets.only( + top: 5.0, + bottom: 10, + left: 30, + right: 30), + child: TextFormField( + controller: _passwordController, + // focusNode: _focusNodes[2], + obscureText: _obscurePassword, + decoration: InputDecoration( + hintText: _showHints[2] + ? AppLocalizations.of(context)! + .enter_your_password + : null, + // _showHints[2] ? 'Enter your password' : null, + prefixIconConstraints: + const BoxConstraints( + maxWidth: 25 + 16 + 10, + maxHeight: 25 + (8 * 2), + ), + prefixIcon: Padding( + padding: const EdgeInsetsDirectional + .only( + start: 16, + end: 10, + ), + child: Image.asset( + MiscIconAssetPath.lock, + fit: BoxFit.fitHeight, + height: 25, + width: 25, + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade300, + ), + ), + + // prefixIcon: Icon( + // Icons.lock, + // color: Color(0xFF90B0D5), + // ), + suffixIcon: IconButton( + // icon: Icon( + // _obscurePassword + // ? Icons.visibility_off + // : Icons.visibility, + // color: Color(0xFF9EA2A9), + // ), + + icon: Image.asset( + _obscurePassword + ? MiscIconAssetPath + .visibilityOff + : MiscIconAssetPath.visibleOn, + + color: Color( + 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly. + width: 24, + height: 24, + ), + + onPressed: () { + setState(() { + _obscurePassword = + !_obscurePassword; + }); + }, + ), + // border: OutlineInputBorder(), + enabledBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade400, + width: 1), + ), + focusedBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Colors.deepPurple, + width: 2), // Focused border + ), + errorBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Error border + ), + focusedErrorBorder: + OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: + 1), // Match the error color + ), + + counterText: '', + hintStyle: TextStyle( + color: Color(0xFFC3C6CB), + fontSize: + registerLocale?.languageCode == + 'ar' + ? 14 + : 16, + ), + ), + validator: _validatePassword, + maxLength: 40, + maxLengthEnforcement: + MaxLengthEnforcement.enforced, + ), + ), + SizedBox(height: 15), + Padding( + padding: const EdgeInsets.only( + top: 5.0, + bottom: 10, + left: 30, + right: 30), + child: TextFormField( + controller: _confirmpasswordController, + // focusNode: _focusNodes[3], + obscureText: _obscureConfirmPassword, + decoration: InputDecoration( + hintText: _showHints[3] + ? AppLocalizations.of(context)! + .register_Confirm_password + : null, + // _showHints[3] ? 'Confirm password' : null, + prefixIconConstraints: + const BoxConstraints( + maxWidth: 25 + 16 + 10, + maxHeight: 25 + (8 * 2), + ), + prefixIcon: Padding( + padding: const EdgeInsetsDirectional + .only( + start: 16, + end: 10, + ), + child: Image.asset( + MiscIconAssetPath.lock, + fit: BoxFit.fitHeight, + height: 25, + width: 25, + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade300, + ), + ), + + suffixIcon: IconButton( + icon: Image.asset( + _obscureConfirmPassword + ? MiscIconAssetPath + .visibilityOff + : MiscIconAssetPath.visibleOn, + + color: Color( + 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly. + width: 24, + height: 24, + ), + onPressed: () { + setState(() { + _obscureConfirmPassword = + !_obscureConfirmPassword; + }); + }, + ), + // border: OutlineInputBorder( + // borderSide: BorderSide(color: Colors.blue, width: 2), // Default border color + // ), + enabledBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: MyTheme.topicColor( + IndicatorTopic.economy) + .shade400, + width: 1), + ), + focusedBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Colors.deepPurple, + width: 2), // Focused border + ), + errorBorder: OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: 1), // Error border + ), + focusedErrorBorder: + OutlineInputBorder( + borderRadius: + BorderRadius.circular(10), + borderSide: BorderSide( + color: Color(0xFFb22222), + width: + 1), // Match the error color + ), + counterText: '', + hintStyle: TextStyle( + color: Color(0xFFC3C6CB), + fontSize: + registerLocale?.languageCode == + 'ar' + ? 14 + : 16, + ), + ), + validator: _validateConfirmPassword, + maxLength: 40, + maxLengthEnforcement: + MaxLengthEnforcement.enforced, + inputFormatters: [ + LengthLimitingTextInputFormatter( + 64), // Limit to 40 characters + ], + ), + ), + SizedBox(height: 10), + Padding( + padding: const EdgeInsets.only( + top: 0, + bottom: 10, + left: 25, + right: 30), + child: Row( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Checkbox( + value: isChecked, + onChanged: (value) { + setState(() { + isChecked = value ?? false; + showError = false; + }); + }, + side: BorderSide( + color: showError + ? Color(0xFFb22222) + : MyTheme.topicColor( + IndicatorTopic.economy) + .shade400, + width: 1, + ), + ), + Expanded( + child: Padding( + padding: const EdgeInsets.only( + top: 14.0,), + child: Text.rich( + TextSpan( + text: AppLocalizations.of( + context,)! + .agree, + // text: 'I agree to ', + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: registerLocale + ?.languageCode == + 'ar' + ? 12 + : 14, + color: Color( + 0xFF898C81,), // Change to your desired color + ), + children: [ + TextSpan( + recognizer:TapGestureRecognizer() + ..onTap = () => context.push('/terms&conditions'), + text: AppLocalizations.of( + context)! + .terms_conditions, + // text: 'Terms & Conditions', + style: TextStyle( + fontSize: registerLocale + ?.languageCode == + 'ar' + ? 12 + : 14, + fontWeight: + FontWeight.bold, + color: + Color(0xFF985400), + // Makes the text bold + // decoration: + // TextDecoration.underline, + decorationColor: + Color(0xFF985400), + decorationThickness: + 1), + ), + TextSpan( + text: AppLocalizations.of( + context)! + .t_and, + style: TextStyle( + color: Color( + 0xFF898C81), // Change to your desired color + ), + ), + TextSpan( + recognizer: TapGestureRecognizer() + ..onTap = () => context.push('/privacy_policy'), + text: AppLocalizations.of( + context)! + .privacy_policy, + style: TextStyle( + fontWeight: + FontWeight.bold, + fontSize: registerLocale + ?.languageCode == + 'ar' + ? 12 + : 14, + fontFamily: 'Roboto', + color: + Color(0xFF985400), + // decoration: + // TextDecoration.underline, + decorationColor: + Color(0xFF648CBA), + decorationThickness: + 1), + ), + TextSpan( + text: AppLocalizations.of( + context)! + .conditions, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: registerLocale + ?.languageCode == + 'ar' + ? 12 + : 14, + color: Color( + 0xFF898C81), // Change to your desired color + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + if (showError) + Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only( + left:registerLocale + ?.languageCode == + 'ar' + ? 0 + : 30.0, + right: registerLocale + ?.languageCode == + 'ar' + ? 40 + : 0.0,), + child: Text( + context.translate('Required', 'مطلوب'), + style: TextStyle( + color: Color(0xFFb22222), + fontSize: registerLocale + ?.languageCode == + 'ar' + ? 12 + : 12, + ), + ), + ), + ], + ), + SizedBox(height: 20), + Padding( + padding: const EdgeInsets.only( + top: 5.0, + bottom: 10, + left: 30, + right: 30), + child: SizedBox( + width: screenwidth / 1, + child: ElevatedButton( + onPressed: isRegistering + ? null + : _registerUser, + style: ElevatedButton.styleFrom( + backgroundColor: Color( + 0xFFA7887A), // Brownish color for Register + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(10), + ), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + // "Register", + AppLocalizations.of(context)! + .register_title, + style: TextStyle( + fontSize: registerLocale + ?.languageCode == + 'ar' + ? 14 + : 16, + color: Colors.white), + ), + SizedBox(width: 8), + const Icon( + Icons.chevron_right_outlined, + color: Colors + .white, // Set your desired color here + ) + ], + ), + ), + ), + ), + SizedBox(height: 15), + Text( + AppLocalizations.of(context)! + .account_confirmation, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: + registerLocale?.languageCode == + 'ar' + ? 12 + : 14, + color: Color(0xFF898C81), + ), + ), + SizedBox(height: 15), + Padding( + padding: const EdgeInsets.only( + top: 5.0, + bottom: 10, + left: 30, + right: 30), + child: SizedBox( + width: screenwidth / 1, + child: ElevatedButton( + onPressed: () { + context.pop(); + }, + style: ElevatedButton.styleFrom( + backgroundColor: Color( + 0xFF82AFCB), // Blueish color for Login + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(10), + ), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + AppLocalizations.of(context)! + .login_title, + style: TextStyle( + fontSize: 16, + color: Colors.white), + ), + SizedBox(width: 8), + const Icon( + Icons.chevron_right_outlined, + color: Colors + .white, // Set your desired color here + ) + ], + ), + ), + ), + ), + SizedBox( + height: 10, + ), + Center( + child: Container( + height: screenheight / 16, + width: screenwidth / 3, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + "assets/splash_screen/logo.png"), // Background image asset + fit: BoxFit.fill, + ), + ), + )), + SizedBox( + height: 20, + ), + ], + ), + ), + ), + ]), + // Container( + // height: MediaQuery.of(context).size.height / 1.2, + // child: + // ), + ], + ), ), ), ), diff --git a/lib/presentation/Screens/auth_verification/terms&conditions.dart b/lib/presentation/Screens/auth_verification/terms&conditions.dart index c4e2192d..5ea68038 100644 --- a/lib/presentation/Screens/auth_verification/terms&conditions.dart +++ b/lib/presentation/Screens/auth_verification/terms&conditions.dart @@ -17,6 +17,7 @@ class TermsOfUse extends StatelessWidget { ), child: Scaffold( appBar: AppBar( + scrolledUnderElevation: 0, title:Text(context.translate( 'Terms & Conditions', 'الشروط والأحكام', diff --git a/lib/presentation/Screens/charts/screens/chart_screen.dart b/lib/presentation/Screens/charts/screens/chart_screen.dart index afd5b95e..1859191b 100644 --- a/lib/presentation/Screens/charts/screens/chart_screen.dart +++ b/lib/presentation/Screens/charts/screens/chart_screen.dart @@ -1,6 +1,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:go_router/go_router.dart'; import 'package:pocketbase/pocketbase.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -2038,16 +2039,17 @@ class _ChartScreen1State extends ConsumerState { // color: Colors.white), // ), // const SizedBox(width: 5), - Image.asset( - isBookmarked - ? UaeNumbersAssetPath - .bookmarksSelectedUae // Filled bookmark image - : UaeNumbersAssetPath - .bookmarksUae, // Default bookmark image - // color: Colors.white, - width: 24, - height: 24, - ), + // Image.asset( + // isBookmarked + // ? UaeNumbersAssetPath + // .bookmarksSelectedUae // Filled bookmark image + // : UaeNumbersAssetPath + // .bookmarksUae, // Default bookmark image + // // color: Colors.white, + // width: 24, + // height: 24, + // ), + Icon(Icons.bookmarks_rounded, color:isBookmarked ? Colors.black:Colors.white ,), ], ), ), @@ -2069,18 +2071,24 @@ class _ChartScreen1State extends ConsumerState { SizedBox(width: 5), Stack( children: [ - Image.asset( - UaeNumbersAssetPath.shareUae, - color: Colors.white, // Outline color - width: 24, // Slightly larger - height: 24, - ), - Image.asset( - UaeNumbersAssetPath.shareUae, - color: Colors.white, + // Image.asset( + // UaeNumbersAssetPath.shareUae, + // color: Colors.white, // Outline color + // width: 24, // Slightly larger + // height: 24, + // ), + // Image.asset( + // UaeNumbersAssetPath.shareUae, + // color: Colors.white, + // width: 24, + // height: 24, + // ), + SvgPicture.asset( + UaeNumbersAssetPath.share, + semanticsLabel: 'share', width: 24, height: 24, - ), + ), ], ) ], diff --git a/lib/presentation/Screens/profilepage.dart b/lib/presentation/Screens/profilepage.dart index f88960d8..30886860 100644 --- a/lib/presentation/Screens/profilepage.dart +++ b/lib/presentation/Screens/profilepage.dart @@ -5,6 +5,7 @@ import 'package:external_repos/external_repos.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; import 'package:http/http.dart' as http; import 'package:image_picker/image_picker.dart'; @@ -15,6 +16,8 @@ import 'package:uae_stat/config/my_theme.dart'; import 'package:uae_stat/domain/use_cases/language.dart'; import 'package:uae_stat/infrastructure/data/p_auth_repo.dart'; import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart'; +import 'package:uae_stat/presentation/components/indicators/locale_provider.dart'; +import 'package:uae_stat/presentation/components/my_toggle.dart'; import 'package:uae_stat/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -22,15 +25,15 @@ import '../components/my_bottom_nav_bar.dart'; import 'auth_verification/changepassword.dart'; import 'demo_home.dart'; -class ProfileScreen extends StatefulWidget { +class ProfileScreen extends ConsumerStatefulWidget { final String userId; // Add this field to hold the user ID const ProfileScreen({Key? key, required this.userId}) : super(key: key); @override - State createState() => _ProfileScreenState(); + ConsumerState createState() => _ProfileScreenState(); } -class _ProfileScreenState extends State { +class _ProfileScreenState extends ConsumerState { final _pb = PocketBase('https://pb.venbait.in'); // final _pb = PocketBase('http://127.0.0.1:8090'); @@ -461,6 +464,7 @@ class _ProfileScreenState extends State { }, child: Scaffold( appBar: AppBar( + scrolledUnderElevation: 0, backgroundColor: Colors.white, elevation: 0, leading: IconButton( @@ -473,6 +477,23 @@ class _ProfileScreenState extends State { AppLocalizations.of(context)!.my_profile, style: TextStyle(color: Color(0xFF985400)), ), + actions: [ + Consumer( + builder: (context, ref, _) { + final locale = ref.watch(localeProvider); // Current locale + return MyToggle( + isOn: locale?.languageCode == 'en', + knobTextWhenOn: 'ع', + knobTextWhenOff: 'EN', + pathColorWhenOn: Colors.grey.shade300, + pathColorWhenOff: Colors.grey.shade300, + onTap: () { + ref.read(localeProvider.notifier).toggleLocale(); + }, + ); + }, + ), + ], // actions: [ // TextButton( // onPressed: () { @@ -788,74 +809,86 @@ class _ProfileScreenState extends State { ), ), Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - Text.rich( - TextSpan( - text: AppLocalizations.of(context)!.agree, - style: TextStyle(color: Color(0xFF898C81)), - children: [ - TextSpan( - recognizer:TapGestureRecognizer() - ..onTap = () => context.push('/terms&conditions'), - text: AppLocalizations.of( - context, - )! - .terms_conditions, - style: TextStyle( - color: Color(0xFF985400), - // decoration: TextDecoration.underline, - fontWeight: FontWeight - .w600, // Makes the text bold - decorationColor: Color(0xFF985400), - decorationThickness: 1, - ), - ), - TextSpan( - text: AppLocalizations.of( - context, - )! - .t_and, - style: TextStyle(color: Color(0xFF898C81)), - ), - TextSpan( - recognizer: TapGestureRecognizer() - ..onTap = () => context.push('/privacy_policy'), - - text: AppLocalizations.of( - context, - )! - .privacy_policy, - style: TextStyle( - color: Color(0xFF985400), - // decoration: TextDecoration.underline, - fontWeight: FontWeight - .w600, // Makes the text bold - decorationColor: Color(0xFF985400), - decorationThickness: 1, - ), - - ), - TextSpan( - text: AppLocalizations.of( - context, - )! - .conditions, - style: TextStyle(color: Color(0xFF898C81)), - ), - ], + child: Padding( + padding: const EdgeInsets.only( + top: 14.0,), + child: Text.rich( + TextSpan( + text: AppLocalizations.of( + context)! + .agree, + // text: 'I agree to ', + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14, + color: Color( + 0xFF898C81,), // Change to your desired color ), - textAlign: TextAlign.start, - maxLines: 2, - overflow: TextOverflow.visible, - softWrap: true, + children: [ + TextSpan( + recognizer:TapGestureRecognizer() + ..onTap = () => context.push('/terms&conditions'), + text: AppLocalizations.of( + context)! + .terms_conditions, + // text: 'Terms & Conditions', + style: TextStyle( + fontSize: 14, + fontWeight: + FontWeight.bold, + color: + Color(0xFF985400), + // Makes the text bold + // decoration: + // TextDecoration.underline, + decorationColor: + Color(0xFF985400), + decorationThickness: + 1), + ), + TextSpan( + text: AppLocalizations.of( + context)! + .t_and, + style: TextStyle( + color: Color( + 0xFF898C81), // Change to your desired color + ), + ), + TextSpan( + recognizer: TapGestureRecognizer() + ..onTap = () => context.push('/privacy_policy'), + text: AppLocalizations.of( + context)! + .privacy_policy, + style: TextStyle( + fontWeight: + FontWeight.bold, + fontSize: 14, + fontFamily: 'Roboto', + color: + Color(0xFF985400), + // decoration: + // TextDecoration.underline, + decorationColor: + Color(0xFF648CBA), + decorationThickness: + 1), + ), + TextSpan( + text: AppLocalizations.of( + context)! + .conditions, + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14, + color: Color( + 0xFF898C81), // Change to your desired color + ), + ), + ], ), - ], + ), ), ), ], diff --git a/lib/presentation/routes/auth_routes/login_route.dart b/lib/presentation/routes/auth_routes/login_route.dart index 29618deb..330bd057 100644 --- a/lib/presentation/routes/auth_routes/login_route.dart +++ b/lib/presentation/routes/auth_routes/login_route.dart @@ -449,8 +449,8 @@ class LoginRoute extends HookConsumerWidget { 'Roboto', 'Roboto', ), - fontSize: locale?.languageCode == 'ar' ? 14: 18, - fontWeight: FontWeight.bold, + fontSize: locale?.languageCode == 'ar' ? 12: 18, + fontWeight: FontWeight.w500, ) ), 6.horizontalSpace, 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 421a59f9..557e9dbf 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 @@ -1266,7 +1266,7 @@ class InfoCard extends StatelessWidget { return GestureDetector( onTap: () { - context.go( + context.push( '/chartScreen/$dataset?bgColor=$colorPattern&mainTopic=$encodedMainTopic&title=$encodedTitle&key=$encodedKey'); }, child: Container( diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/AboutFCSC.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/AboutFCSC.dart index 53f73395..7b332537 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/AboutFCSC.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/AboutFCSC.dart @@ -16,6 +16,7 @@ class aboutFCSC extends StatelessWidget { ); return BaseScaffold( showDivider: true, + showBackButton: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/getStarted.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/getStarted.dart index 1a0ebf95..763ba1d7 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/getStarted.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/AboutTheApp/getStarted.dart @@ -23,6 +23,7 @@ class GetStarted extends StatelessWidget { ), child: BaseScaffold( showDivider: true, + showBackButton: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/AppFeatures.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/AppFeatures.dart index 803d013d..b15d522c 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/AppFeatures.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/AppFeatures.dart @@ -21,6 +21,7 @@ class AppFeatures extends StatelessWidget { ), child: BaseScaffold( showDivider: true, + showBackButton: true, bottomColor: Colors.white, dividerColor: Colors.grey[300], appbarColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/ChangeMyPassword.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/ChangeMyPassword.dart index cbdda79b..908b26bc 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/ChangeMyPassword.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/ChangeMyPassword.dart @@ -21,6 +21,7 @@ class ChangeMyPassword extends StatelessWidget { ), child: BaseScaffold( showDivider: true, + showBackButton: true, bottomColor: Colors.white, dividerColor: Colors.grey[300], appbarColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/EditMyProfile.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/EditMyProfile.dart index 9668065d..d125fe39 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/EditMyProfile.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/EditMyProfile.dart @@ -21,6 +21,7 @@ class EditMyProfile extends StatelessWidget { ), child: BaseScaffold( showDivider: true, + showBackButton: true, bottomColor: Colors.white, dividerColor: Colors.grey[300], appbarColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/howUseTheApp.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/howUseTheApp.dart index b20bd1c0..513871eb 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/howUseTheApp.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/howUseTheApp.dart @@ -21,6 +21,7 @@ class HowUseTheApp extends StatelessWidget { ), child: BaseScaffold( showDivider: true, + showBackButton: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/purpose.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/purpose.dart index 273e7371..85f3de4d 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/purpose.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/purpose.dart @@ -24,6 +24,7 @@ class Purpose extends StatelessWidget { ), child: BaseScaffold( showDivider: true, + showBackButton: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/stayUpdate.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/stayUpdate.dart index bf90dd4f..a7333e0b 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/stayUpdate.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/stayUpdate.dart @@ -24,6 +24,7 @@ class StayUpdate extends StatelessWidget { ), child: BaseScaffold( showDivider: true, + showBackButton: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/useTheApp.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/useTheApp.dart index 9d3a01e5..f34258b0 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/useTheApp.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/KeyFeatures/useTheApp.dart @@ -21,6 +21,7 @@ class WhoUseTheApp extends StatelessWidget { ), child: BaseScaffold( showDivider: true, + showBackButton: true, dividerColor: Colors.grey[300], appbarColor: Colors.white, bottomColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/aboutApp.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/aboutApp.dart index b41c7224..98eb4cd9 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/aboutApp.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/aboutApp.dart @@ -16,6 +16,7 @@ class aboutTheApp extends StatelessWidget { ); return BaseScaffold( showDivider: true, + showBackButton: true, bottomColor: Colors.white, dividerColor: Colors.grey[300], appbarColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart index 642131bf..633666ff 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/faq_page.dart @@ -20,6 +20,7 @@ class _FAQPageState extends State { Widget build(BuildContext context) { return BaseScaffold( dividerColor: Colors.grey[300], + showBackButton: true, appbarColor: Colors.white, bottomColor: Colors.white, mycenterTitle: true, diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart index a646a1ca..9743c868 100755 --- a/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/user_guide/features.dart @@ -17,6 +17,7 @@ class UsingFeatures extends StatelessWidget { ); return BaseScaffold( showDivider: true, + showBackButton: true, dividerColor: Colors.grey[300], bottomColor: Colors.white, appbarColor: Colors.white, diff --git a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart index a35aeb93..e7dc4e67 100644 --- a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart +++ b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart @@ -698,14 +698,15 @@ class _BaseScaffoldState extends ConsumerState { child: IconButton( padding: EdgeInsets.zero, constraints: BoxConstraints(), - color: Colors.white, + color: widget.colorChange ? Colors.white : Colors.black, icon: const Icon(Icons.arrow_back_ios_new, size: 24), onPressed: () { - if ((widget.navBackArrow as Text).data == 'home') { - context.go('/myhomepage'); - } else { - context.go('/uaenumbers'); - } + // if ((widget.navBackArrow as Text).data == 'home') { + // context.go('/myhomepage'); + // } else { + // context.go('/uaenumbers'); + // } + context.pop(); }, ), ), @@ -755,7 +756,7 @@ class _BaseScaffoldState extends ConsumerState { ), ], ), - Divider(), + // Divider(), InkWell( onTap: () { if (userId != 'guest') context.go('/editProfile'); diff --git a/pubspec.lock b/pubspec.lock index c8b9ce43..1bd69787 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -568,7 +568,7 @@ packages: source: hosted version: "0.7.0" flutter_svg: - dependency: transitive + dependency: "direct main" description: name: flutter_svg sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b diff --git a/pubspec.yaml b/pubspec.yaml index 956f8eca..11f6afb9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -63,6 +63,7 @@ dependencies: connectivity_plus: ^6.1.2 tutorial_coach_mark: ^1.2.12 package_info_plus: ^8.2.0 + flutter_svg: ^2.0.17 dependency_overrides: fading_edge_scrollview: ^4.1.1 @@ -136,6 +137,7 @@ flutter: - assets/icons/misc/group.png - assets/icons/misc/search.png + fonts: - family: Segoe fonts: