From 53f1e107213d0bf5401c5e7bf6bba1721bea136d Mon Sep 17 00:00:00 2001 From: venbaittech Date: Wed, 5 Feb 2025 14:44:27 +0530 Subject: [PATCH] UI changes added --- lib/l10n/intl_ar.arb | 4 +- lib/l10n/intl_en.arb | 2 +- .../UAE_Numbers/uae_numbers.dart | 7 +- .../auth_verification/registration.dart | 102 +++++++++------ .../Screens/charts/screens/chart_screen.dart | 37 +++--- lib/presentation/Screens/profilepage.dart | 117 ++++++++++-------- .../components/themed_text_field.dart | 14 +-- .../routes/auth_routes/login_route.dart | 16 +-- .../Drawer Items/edit_profile.dart | 96 +++++++++++--- .../drawer_routes/custom_drawer_routes.dart | 50 ++++++-- pubspec.lock | 52 ++++---- pubspec.yaml | 2 +- 12 files changed, 322 insertions(+), 177 deletions(-) diff --git a/lib/l10n/intl_ar.arb b/lib/l10n/intl_ar.arb index 1f5eb600..8766c03b 100644 --- a/lib/l10n/intl_ar.arb +++ b/lib/l10n/intl_ar.arb @@ -15,8 +15,8 @@ "agree": "أوافق على الشروط والأحكام وسياسة الخصوصية للمركز الإتحادي للتنافسية والإحصاء", "t_and": "", "conditions": "", - "terms_conditions": "", - "privacy_policy":"", + "terms_conditions": "الشروط والأحكام", + "privacy_policy":"سياسة الخصوصية", "account_confirmation": "هل لديك حساب؟ سجل الدخول", "login_title": "تسجيل الدخول", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index addb66f5..f99002cb 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -12,7 +12,7 @@ "enter_your_email": "Enter your email", "enter_your_password": "Enter your password", "register_Confirm_password": "Confirm password", - "agree": "I agree to the", + "agree": "I agree to the ", "t_and": " and ", "conditions": " of FCSC", "terms_conditions": "Terms & Conditions", 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 6917a159..c5bd1e8a 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 @@ -83,12 +83,13 @@ class _UaenumberWidgetState extends ConsumerState { decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(30.0), - border: Border.all(width: 1)), + border: Border.all(width: 1,color: Color(0xFFAA8E83)),), child: TextField( decoration: InputDecoration( hintText: "Search", - prefixIcon: Icon(Icons.search), - border: InputBorder.none, + prefixIcon: Icon(Icons.search, + color: Color(0xFFAA8E83),), + border: InputBorder.none, contentPadding: EdgeInsets.symmetric(vertical: 15.0, horizontal: 20.0), ), diff --git a/lib/presentation/Screens/auth_verification/registration.dart b/lib/presentation/Screens/auth_verification/registration.dart index ab0e9586..973d3481 100644 --- a/lib/presentation/Screens/auth_verification/registration.dart +++ b/lib/presentation/Screens/auth_verification/registration.dart @@ -474,7 +474,7 @@ class _RegisterScreenState extends State { ), ) : Padding( - padding: const EdgeInsets.only(top: 5.0,bottom: 20, left: 20,right: 20), + padding: const EdgeInsets.only(top: 5.0,bottom: 20, left: 30,right: 30), child: Form( key: _formKey, @@ -503,12 +503,12 @@ class _RegisterScreenState extends State { ? AppLocalizations.of(context)!.register_name : null, prefixIcon: Padding( - padding: const EdgeInsets.all(8.0), // Adjust the padding as needed + padding: const EdgeInsets.only(bottom: 1.0,top:1.0,right:10.0,left:15.0 ), // Adjust the padding as needed child: Image.asset( MiscIconAssetPath.person, color: Color(0xFF90B0D5), - width: 24, - height: 24, + width: 25, + height: 15, ), ), @@ -520,15 +520,20 @@ class _RegisterScreenState extends State { // border: OutlineInputBorder(), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(10), - borderSide: BorderSide(color: Color(0xFF90B0D5), width: 2), // Enabled border - ), +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(0xFFD83731), width: 1), // Error border + 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)), @@ -550,26 +555,31 @@ class _RegisterScreenState extends State { : null, // _showHints[1] ? 'Enter your email' : null, prefixIcon: Padding( - padding: const EdgeInsets.all(8.0), // Adjust the padding as needed + padding: const EdgeInsets.only(bottom: 1.0,top:1.0,right:10.0,left:15.0 ), // Adjust the padding as needed child: Image.asset( MiscIconAssetPath.vector, color: Color(0xFF90B0D5), - width: 24, - height: 24, + width: 25, + height: 15, ), ), // border: OutlineInputBorder(), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(10), - borderSide: BorderSide(color: Color(0xFF90B0D5), width: 2), // Enabled border - ), +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(0xFFD83731), width: 1), // Error border + 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)), @@ -594,12 +604,12 @@ class _RegisterScreenState extends State { : null, // _showHints[2] ? 'Enter your password' : null, prefixIcon: Padding( - padding: const EdgeInsets.all(8.0), // Adjust the padding as needed + padding: const EdgeInsets.only(bottom: 1.0,top:1.0,right:10.0,left:15.0 ), // Adjust the padding as needed child: Image.asset( MiscIconAssetPath.lock, color: Color(0xFF90B0D5), - width: 24, - height: 24, + width: 25, + height: 15, ), ), // prefixIcon: Icon( @@ -634,16 +644,22 @@ class _RegisterScreenState extends State { // border: OutlineInputBorder(), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(10), - borderSide: BorderSide(color: Color(0xFF90B0D5), width: 2), // Enabled border - ), +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(0xFFD83731), width: 1), // Error border + 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)), ), @@ -663,12 +679,12 @@ class _RegisterScreenState extends State { : null, // _showHints[3] ? 'Confirm password' : null, prefixIcon: Padding( - padding: const EdgeInsets.all(8.0), // Adjust the padding as needed + padding: const EdgeInsets.only(bottom: 1.0,top:1.0,right:10.0,left:15.0 ), // Adjust the padding as needed child: Image.asset( MiscIconAssetPath.lock, color: Color(0xFF90B0D5), - width: 24, - height: 24, + width: 25, + height: 15, ), ), suffixIcon: IconButton( @@ -694,15 +710,20 @@ class _RegisterScreenState extends State { // ), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(10), - borderSide: BorderSide(color: Color(0xFF90B0D5), width: 2), // Enabled border - ), +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(0xFFD83731), width: 1), // Error border + 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)), @@ -727,8 +748,8 @@ class _RegisterScreenState extends State { }); }, side: BorderSide( - color: showError ? Colors.red : Color(0xFF92722A), - width: 1.5, + color: showError ? Color(0xFFD83731) : Color(0xFF92722A), + width: 1, ), ), Expanded( @@ -741,16 +762,25 @@ class _RegisterScreenState extends State { text: AppLocalizations.of(context)! .terms_conditions, // text: 'Terms & Conditions', - style: TextStyle( color: MyTheme.topicColor(IndicatorTopic.economy).shade600,), - ), +style: TextStyle(fontWeight: FontWeight.bold, + color: Color(0xFF648CBA), + // Makes the text bold + decoration: TextDecoration.underline, + decorationColor: Color(0xFF648CBA), + decorationThickness: 1), + ), TextSpan( text: AppLocalizations.of(context)! .t_and), TextSpan( text: AppLocalizations.of(context)! .privacy_policy, - style: TextStyle( color: MyTheme.topicColor(IndicatorTopic.economy).shade600,), - ), + style: TextStyle(fontWeight: FontWeight.bold, + color: Color(0xFF648CBA), + decoration: TextDecoration.underline, + decorationColor: Color(0xFF648CBA), + decorationThickness: 1), + ), TextSpan( text: AppLocalizations.of(context)! .conditions), @@ -769,7 +799,7 @@ class _RegisterScreenState extends State { child: Text( 'Please agree to terms and conditions.', style: TextStyle( - color: Colors.red[700], + color: Color(0xFFb22222), fontSize: 12, ), ), @@ -778,7 +808,7 @@ class _RegisterScreenState extends State { ), SizedBox(height: 20), SizedBox( - width: screenwidth / 1.3, + width: screenwidth / 1, child: ElevatedButton( onPressed: isRegistering ? null : _registerUser, style: ElevatedButton.styleFrom( @@ -807,15 +837,15 @@ class _RegisterScreenState extends State { ), ), ), - SizedBox(height: 10), + SizedBox(height: 15), Text( AppLocalizations.of(context)!.account_confirmation, style: TextStyle( fontSize: 16, color: Colors.grey[600]), ), - SizedBox(height: 10), + SizedBox(height: 15), SizedBox( - width: screenwidth / 1.3, + width: screenwidth / 1, child: ElevatedButton( onPressed: () { context.go('/'); diff --git a/lib/presentation/Screens/charts/screens/chart_screen.dart b/lib/presentation/Screens/charts/screens/chart_screen.dart index fdd621f0..d6edd328 100644 --- a/lib/presentation/Screens/charts/screens/chart_screen.dart +++ b/lib/presentation/Screens/charts/screens/chart_screen.dart @@ -1295,15 +1295,22 @@ class _ChartScreen1State extends ConsumerState { }); selectedFiltersStorage.clear(); Navigator.pop(context); - }, + }, + + style: ElevatedButton.styleFrom( + backgroundColor: Color(0xFF92722A), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), child: Padding( padding: const EdgeInsets.symmetric( - vertical: 12), // Added padding + horizontal: 0.0, vertical: 14.2), // Added padding child: Text( context.translate('Clear', 'واضح'), style: TextStyle( color: Colors.white, - fontSize: 16, + fontSize: 13, fontWeight: FontWeight.bold, ), overflow: @@ -1311,12 +1318,6 @@ class _ChartScreen1State extends ConsumerState { maxLines: 1, // Ensures single line ), ), - style: ElevatedButton.styleFrom( - backgroundColor: Color(0xFF92722A), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - ), ), ), SizedBox(width: 16), @@ -1334,9 +1335,15 @@ class _ChartScreen1State extends ConsumerState { selectedFilters); selectedFiltersStorage = List.from(selectedFilters); }, + style: ElevatedButton.styleFrom( + backgroundColor: Color(0xFF92722A), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), child: Padding( padding: const EdgeInsets.symmetric( - vertical: 12), // Added padding + horizontal: 0.0, vertical: 16.0), // Added padding child: FittedBox( fit: BoxFit .scaleDown, // Ensures text resizes if necessary @@ -1345,7 +1352,7 @@ class _ChartScreen1State extends ConsumerState { 'Apply Filter', 'تطبيق الفلتر'), style: TextStyle( color: Colors.white, - fontSize: 16, + fontSize: 12, fontWeight: FontWeight.bold, ), overflow: @@ -1353,13 +1360,7 @@ class _ChartScreen1State extends ConsumerState { maxLines: 1, // Ensures single line ), ), - ), - style: ElevatedButton.styleFrom( - backgroundColor: Color(0xFF92722A), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - ), + ), ), ), ], diff --git a/lib/presentation/Screens/profilepage.dart b/lib/presentation/Screens/profilepage.dart index 04eb0a0d..3274d331 100644 --- a/lib/presentation/Screens/profilepage.dart +++ b/lib/presentation/Screens/profilepage.dart @@ -74,6 +74,8 @@ class _ProfileScreenState extends State { // Regular expression to validate Full Name (no special characters) final RegExp _nameRegExp = RegExp(r"^[a-zA-Z\s]+$"); late Future userDetails; + bool _isHoveringDate = false; + bool _isHoveringDropdown = false; @override void initState() { @@ -368,7 +370,7 @@ class _ProfileScreenState extends State { child: Form( key: _formKey, child: Padding( - padding: const EdgeInsets.all(20.0), + padding: const EdgeInsets.only(top: 20.0,bottom: 20.0, left: 25,right: 25), child: Column( children: [ // CircleAvatar( @@ -539,7 +541,10 @@ class _ProfileScreenState extends State { ], ), SizedBox(height: 10), - TextFormField( + MouseRegion( + onEnter: (_) => setState(() => _isHoveringDate = true), + onExit: (_) => setState(() => _isHoveringDate = false), + child: TextFormField( controller: _dateController, focusNode: _focusNodes[3], decoration: InputDecoration( @@ -549,12 +554,22 @@ class _ProfileScreenState extends State { hintText: _showHints[3] ? 'DD/MM/YYYY' : null, //_showHints[3] ? 'Select your Date of Birth' : null, hintStyle: TextStyle(color: Colors.grey), - suffixIcon: const Icon(Icons.arrow_drop_down_sharp), - ), + + suffixIcon: Container( + width: 45, + padding: EdgeInsets.only(right: 1), + alignment: Alignment.center, // Center the icon vertically + child: Icon( + Icons.keyboard_arrow_down_sharp, + color: _isHoveringDate ? Colors.black : Colors.grey, + + ), + ), + ), readOnly: true, onTap: _pickDate, validator: _validateDob, - ), + ),), SizedBox(height: 10), Row( mainAxisAlignment: MainAxisAlignment.start, @@ -567,7 +582,10 @@ class _ProfileScreenState extends State { ], ), SizedBox(height: 10), - DropdownButtonFormField( + MouseRegion( + onEnter: (_) => setState(() => _isHoveringDropdown = true), + onExit: (_) => setState(() => _isHoveringDropdown = false), + child: DropdownButtonFormField( value: _selectedCountry, decoration: InputDecoration( border: OutlineInputBorder( @@ -575,6 +593,8 @@ class _ProfileScreenState extends State { ), labelText: 'Select', ), + icon: Icon(Icons.keyboard_arrow_down_sharp, + color: _isHoveringDropdown ? Colors.black : Colors.grey ), items: _countries .map((item) => DropdownMenuItem( value: item, @@ -587,7 +607,7 @@ class _ProfileScreenState extends State { }); }, validator: _validateDropdown, - ), + ),), SizedBox(height: 20), Row( children: [ @@ -600,8 +620,8 @@ class _ProfileScreenState extends State { }); }, side: BorderSide( - color: showError ? Colors.red : Colors.grey, - width: 1.5, + color: showError ? Color(0xFFb22222) : Color(0xFF92722A), + width: 1, ), ), Expanded( @@ -620,8 +640,11 @@ class _ProfileScreenState extends State { TextSpan( text: 'Terms & Conditions', style: TextStyle( - color: Colors.blue, + color: Color(0xFF648CBA), decoration: TextDecoration.underline, + fontWeight: FontWeight.bold, // Makes the text bold + decorationColor: Color(0xFF648CBA), + decorationThickness: 1, ), recognizer: TapGestureRecognizer() ..onTap = () { @@ -635,8 +658,12 @@ class _ProfileScreenState extends State { TextSpan( text: 'Privacy Policy', style: TextStyle( - color: Colors.blue, + color: Color(0xFF648CBA), decoration: TextDecoration.underline, + fontWeight: FontWeight.bold, // Makes the text bold + decorationColor: Color(0xFF648CBA), + decorationThickness: 1, + ), recognizer: TapGestureRecognizer() ..onTap = () { @@ -668,7 +695,7 @@ class _ProfileScreenState extends State { child: Text( 'Please agree to terms and conditions', style: TextStyle( - color: Colors.red[700], + color: Color(0xFFb22222), fontSize: 12, ), ), @@ -685,53 +712,30 @@ class _ProfileScreenState extends State { context.go('/createNewPw/$userId/$email'); }, child: Text( - "Change Password", + 'Change Password', style: TextStyle( - color: Colors.blue, - decoration: TextDecoration.underline), + color: Color(0xFF648CBA), + fontSize: 14, + fontWeight: FontWeight.w700, + fontFamily: 'Roboto', + // decoration: TextDecoration.underline), + ), ), ), ), SizedBox(height: 20), - ElevatedButton.icon( + // ElevatedButton.icon( + ElevatedButton( onPressed: () { - if ((_formKey.currentState?.validate() ?? false) && - (isChecked)) { + if ((_formKey.currentState?.validate() ?? false) && (isChecked)) { _formKey.currentState?.save(); showConfirmationDialog(context); } else { setState(() { - showError = - !isChecked; // Show error if the checkbox is not checked + showError = !isChecked; // Show error if the checkbox is not checked }); - } - // if ((_formKey.currentState?.validate() ?? false) && (isChecked)) { - // _formKey.currentState?.save(); - // showConfirmationDialog(context); - // // if (isChecked) { - // // _formKey.currentState?.save(); - // // // _confirmSaveProfile(); - // // showConfirmationDialog(context); - // // } - // else { - // setState(() { - // showError = !isChecked; // Show error if the checkbox is not checked - // }); - - // ScaffoldMessenger.of(context).showSnackBar( - // SnackBar(content: Text('Please accept the terms and conditions.',style: TextStyle(color: Colors.white),)), - // ); - //} - //} - }, - icon: Icon( - Icons.save, - color: Colors.white, - ), - label: Text( - 'Save', - style: TextStyle(color: Colors.white), - ), + } + }, style: ElevatedButton.styleFrom( backgroundColor: Color(0xFF92722A), minimumSize: Size(double.infinity, 50), @@ -739,7 +743,22 @@ class _ProfileScreenState extends State { borderRadius: BorderRadius.circular(8), ), ), - ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, // Center the content + children: [ + Text( + 'Save', + style: TextStyle(color: Colors.white), + ), + SizedBox(width: 8), // Add space between text and icon + Icon( + Icons.save_outlined, + color: Colors.white, + ), + ], + ), + ) + ], ), ), diff --git a/lib/presentation/components/themed_text_field.dart b/lib/presentation/components/themed_text_field.dart index 27a526ec..82b58ce6 100644 --- a/lib/presentation/components/themed_text_field.dart +++ b/lib/presentation/components/themed_text_field.dart @@ -25,13 +25,13 @@ class ThemedFormField extends HookWidget { final isObscured = useState(true); final boxDecoration = BoxDecoration( borderRadius: BorderRadius.circular(10), - boxShadow: [ - BoxShadow( - offset: const Offset(0, 1), - blurRadius: 2, - color: Colors.black.withOpacity(0.1), - ), - ], + // boxShadow: [ + // BoxShadow( + // offset: const Offset(0, 1), + // blurRadius: 2, + // color: Colors.black.withOpacity(0.1), + // ), + // ], ); final obscureBtn = IconButton( onPressed: () => isObscured.value = !isObscured.value, diff --git a/lib/presentation/routes/auth_routes/login_route.dart b/lib/presentation/routes/auth_routes/login_route.dart index 5a43b9ee..d68fc20d 100644 --- a/lib/presentation/routes/auth_routes/login_route.dart +++ b/lib/presentation/routes/auth_routes/login_route.dart @@ -177,7 +177,7 @@ class LoginRoute extends HookConsumerWidget { ), fontWeight: FontWeight.bold, fontSize: 14, - color: MyTheme.topicColor(IndicatorTopic.economy).shade600, + color: Color(0xFF985400), ), ), ); @@ -361,7 +361,7 @@ class LoginRoute extends HookConsumerWidget { 6.horizontalSpace, const Icon( Icons.chevron_right_outlined, - color: Colors.white, // Set your desired color here + color: Colors.white, // Set your desired color here ) ], ), @@ -390,7 +390,8 @@ class LoginRoute extends HookConsumerWidget { validator: (text) { if (text == null || text.isEmpty) { return context.translate('Required', 'مطلوب'); - } else if (text.length < 8) { + } + else if (text.length < 8) { return 'The password must be at least 8 characters'; } return FieldValidator.password(minLength: 8)(text); @@ -402,6 +403,7 @@ class LoginRoute extends HookConsumerWidget { imgPath: MiscIconAssetPath.lock, controller: pwCtl, isObscurable: true, + ), // 6.verticalSpace, Align( @@ -441,7 +443,7 @@ class LoginRoute extends HookConsumerWidget { 'Roboto', 'NotoKufi', ), - fontSize: 18, + fontSize: context.translate(18.0, 14.0), color: const Color(0xff898C81), fontWeight: FontWeight.w600, ), @@ -480,8 +482,8 @@ class LoginRoute extends HookConsumerWidget { 'سجل الان', ), style: TextStyle( - color: MyTheme.topicColor(IndicatorTopic.economy).shade600, - ), + color: Color(0xFF985400), + ), ), ], ), @@ -576,7 +578,7 @@ class LoginRoute extends HookConsumerWidget { dontHaveAnAccountRegisterBtn, 20.verticalSpace, // continueAsGuestBtn, - 25.verticalSpace, + 95.verticalSpace, fcscBanner, ], ); 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 7ea353b1..e8a36040 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/edit_profile.dart @@ -76,6 +76,8 @@ class _EditProfileState extends State { dynamic collectionId; dynamic role; + bool _isHoveringDropdown = false; + @override void initState() { super.initState(); @@ -426,13 +428,15 @@ class _EditProfileState extends State { body: SingleChildScrollView( child: Padding( padding: const EdgeInsets.only(left: 10.0, right: 10.0, top: 3.0), + child: Column( children: [ SingleChildScrollView( child: Form( key: _formKey, child: Padding( - padding: const EdgeInsets.all(20.0), + // padding: const EdgeInsets.all(20.0), + padding: const EdgeInsets.only(top: 20.0,bottom: 20.0, left: 25,right: 25), child: isPageLoad ? Center( child: CircularProgressIndicator(), @@ -720,8 +724,16 @@ class _EditProfileState extends State { ), // hintText: _showHints[3] ? 'Select your Date of Birth' : null, hintStyle: TextStyle(color: Colors.grey), - suffixIcon: - const Icon(Icons.arrow_drop_down_sharp), + suffixIcon: Container( + width: 45, + padding: EdgeInsets.only(right: 1), + alignment: Alignment.center, // Center the icon vertically + child: Icon( + Icons.keyboard_arrow_down_sharp, + color: Colors.grey, + + ), + ), enabled: !_isProfileCompleted, ), readOnly: true, @@ -742,7 +754,10 @@ class _EditProfileState extends State { ], ), SizedBox(height: 10), - DropdownButtonFormField( + MouseRegion( + onEnter: (_) => setState(() => _isHoveringDropdown = true), + onExit: (_) => setState(() => _isHoveringDropdown = false), + child: DropdownButtonFormField( value: _selectedCountry, decoration: InputDecoration( border: OutlineInputBorder( @@ -750,6 +765,8 @@ class _EditProfileState extends State { ), labelText: 'Select', ), + icon: Icon(Icons.keyboard_arrow_down_sharp, + color: _isHoveringDropdown ? Colors.black : Colors.grey ), items: _countries .map( (item) => DropdownMenuItem( @@ -764,7 +781,7 @@ class _EditProfileState extends State { }); }, validator: _validateDropdown, - ), + ),), SizedBox(height: 20), if (!_isProfileCompleted) // Conditional rendering Column( @@ -809,7 +826,8 @@ class _EditProfileState extends State { )! .terms_conditions, style: TextStyle( - color: Colors.blue, + // color: Colors.blue, + color: Color(0xFF648CBA), decoration: TextDecoration .underline, @@ -835,7 +853,8 @@ class _EditProfileState extends State { )! .privacy_policy, style: TextStyle( - color: Colors.blue, + // color: Colors.blue, + color: Color(0xFF648CBA), decoration: TextDecoration .underline, @@ -898,25 +917,47 @@ class _EditProfileState extends State { AppLocalizations.of(context)! .change_password, style: TextStyle( - color: Colors.blue, - decoration: TextDecoration.underline, + color: Color(0xFF648CBA), + fontSize: 14, + fontWeight: FontWeight.w700, + fontFamily: 'Roboto', + // decoration: TextDecoration.underline ), ), ), ), SizedBox(height: 20), - ElevatedButton.icon( + // ElevatedButton.icon( + // onPressed: () { + // showConfirmationDialog(context); + // }, + // icon: Icon( + // Icons.save, + // color: Colors.white, + // ), + // label: Text( + // AppLocalizations.of(context)!.save, + // style: TextStyle(color: Colors.white), + // ), + // style: ElevatedButton.styleFrom( + // backgroundColor: Color(0xFF92722A), + // minimumSize: Size(double.infinity, 50), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(8), + // ), + // ), + // ), + ElevatedButton( onPressed: () { - showConfirmationDialog(context); + if ((_formKey.currentState?.validate() ?? false) && (isChecked)) { + _formKey.currentState?.save(); + showConfirmationDialog(context); + } else { + setState(() { + showError = !isChecked; // Show error if the checkbox is not checked + }); + } }, - icon: Icon( - Icons.save, - color: Colors.white, - ), - label: Text( - AppLocalizations.of(context)!.save, - style: TextStyle(color: Colors.white), - ), style: ElevatedButton.styleFrom( backgroundColor: Color(0xFF92722A), minimumSize: Size(double.infinity, 50), @@ -924,7 +965,22 @@ class _EditProfileState extends State { borderRadius: BorderRadius.circular(8), ), ), - ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, // Center the content + children: [ + Text( + 'Save', + style: TextStyle(color: Colors.white), + ), + SizedBox(width: 8), // Add space between text and icon + Icon( + Icons.save_outlined, + color: 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 9e3702ea..9fb351b9 100644 --- a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart +++ b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart @@ -10,6 +10,7 @@ import 'package:pocketbase/pocketbase.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; +import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/bottom_bar_asset_icon_path.dart'; import 'package:uae_stat/presentation/components/indicators/locale_provider.dart'; import 'package:uae_stat/presentation/components/my_toggle.dart'; @@ -124,7 +125,7 @@ class _BaseScaffoldState extends ConsumerState { text: AppLocalizations.of(context)!.tour_navBar, alignment: ContentAlign.top, space: 0, - gap: 105, + gap: 100, ), TargetContent( align: ContentAlign.top, @@ -816,29 +817,64 @@ class _BaseScaffoldState extends ConsumerState { type: BottomNavigationBarType.fixed, items: [ BottomNavigationBarItem( - icon: Icon(Icons.home), + icon: Padding( + padding: const EdgeInsets.only(bottom: 4), // Adjust this for spacing + child: Image.asset( + BottomBarAssetIconPath.home, + color: _getSelectedIndex(currentRoute) == 0 ? Colors.black : Color(0xFF989898), + width: 20, + height: 20, + ),), // label: 'Home', label: AppLocalizations.of(context)!.nav_home, ), BottomNavigationBarItem( - icon: Icon(Icons.map), + // icon: Icon(Icons.map), + icon:Padding( + padding: const EdgeInsets.only(bottom: 4), // Adjust this for spacing + child: Image.asset( + BottomBarAssetIconPath.uaeMap, + color: _getSelectedIndex(currentRoute) == 1 ? Colors.black : Color(0xFF989898), + width: 20, + height: 20, + ),), // label: 'UAE Numbers' label: AppLocalizations.of(context)!.nav_uae, ), BottomNavigationBarItem( - icon: Icon(Icons.bar_chart), - // label: 'Competitiveness', +icon: Padding( + padding: const EdgeInsets.only(bottom: 4), // Adjust this for spacing + child: Image.asset( + BottomBarAssetIconPath.ranking, + color: _getSelectedIndex(currentRoute) == 2 ? Colors.black : Color(0xFF989898), + width: 20, + height: 20, + ),), + // label: 'Competitiveness', label: AppLocalizations.of(context)!.nav_competitiveness, ), BottomNavigationBarItem( - icon: Icon(Icons.public), - // label: 'Country Profile', + icon: Padding( + padding: const EdgeInsets.only(bottom: 4), // Adjust this for spacing + child: Image.asset( + BottomBarAssetIconPath.globe, + color: _getSelectedIndex(currentRoute) == 2 ? Colors.black : Color(0xFF989898), + width: 20, + height: 20, + ),), + // label: 'Country Profile', label: AppLocalizations.of(context)!.country_profile, ), ], key: bottomNavKey, selectedItemColor: Colors.black, unselectedItemColor: Colors.grey, + selectedLabelStyle: TextStyle( + fontSize: 10, // Font size for unselected label + ), + unselectedLabelStyle: TextStyle( + fontSize: 10, // Font size for unselected label + ), showUnselectedLabels: true, ), body: widget.body, diff --git a/pubspec.lock b/pubspec.lock index f56d59cd..99484f5b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,23 +5,23 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 + sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" url: "https://pub.dev" source: hosted - version: "72.0.0" + version: "76.0.0" _macros: dependency: transitive description: dart source: sdk - version: "0.3.2" + version: "0.3.3" analyzer: dependency: transitive description: name: analyzer - sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 + sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" url: "https://pub.dev" source: hosted - version: "6.7.0" + version: "6.11.0" analyzer_plugin: dependency: transitive description: @@ -210,10 +210,10 @@ packages: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" connectivity_plus: dependency: "direct main" description: @@ -306,10 +306,10 @@ packages: dependency: transitive description: name: custom_lint_visitor - sha256: "8aeb3b6ae2bb765e7716b93d1d10e8356d04e0ff6d7592de6ee04e0dd7d6587d" + sha256: bfe9b7a09c4775a587b58d10ebb871d4fe618237639b1e84d5ec62d7dfef25f9 url: "https://pub.dev" source: hosted - version: "1.0.0+6.7.0" + version: "1.0.0+6.11.0" dart_style: dependency: transitive description: @@ -433,10 +433,10 @@ packages: dependency: "direct main" description: name: fl_chart - sha256: "74959b99b92b9eebeed1a4049426fd67c4abc3c5a0f4d12e2877097d6a11ae08" + sha256: "5276944c6ffc975ae796569a826c38a62d2abcf264e26b88fa6f482e107f4237" url: "https://pub.dev" source: hosted - version: "0.69.2" + version: "0.70.2" flutter: dependency: "direct main" description: flutter @@ -837,18 +837,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -877,10 +877,10 @@ packages: dependency: transitive description: name: macros - sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" url: "https://pub.dev" source: hosted - version: "0.1.2-main.4" + version: "0.1.3-main.0" mailer: dependency: "direct main" description: @@ -1268,7 +1268,7 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" smart_api_client: dependency: "direct main" description: @@ -1352,10 +1352,10 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.0" state_notifier: dependency: transitive description: @@ -1384,10 +1384,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" syncfusion_flutter_charts: dependency: "direct main" description: @@ -1424,10 +1424,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.3" the_validator: dependency: "direct main" description: @@ -1592,10 +1592,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.3.0" watcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 41ccf85d..907eb18d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: riverpod_annotation: ^2.3.3 cupertino_icons: ^1.0.6 - fl_chart: ^0.69.2 + fl_chart: ^0.70.2 tutorial_coach_mark: ^1.2.12 marquee: ^2.2.3 url_launcher: ^6.3.1