diff --git a/android/app/build.gradle b/android/app/build.gradle index bc59d713..d5559200 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -23,9 +23,9 @@ if (flutterVersionName == null) { flutterVersionName = "1.0.15" } -def keystorePropertiesFile = rootProject.file("key.properties") -def keystoreProperties = new Properties() -keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +//def keystorePropertiesFile = rootProject.file("key.properties") +//def keystoreProperties = new Properties() +//keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) android { namespace = "ae.gov.fcsc.frontend" @@ -52,20 +52,20 @@ android { versionName = flutterVersionName } - signingConfigs { - release { - keyAlias keystoreProperties['keyAlias'] - keyPassword keystoreProperties['keyPassword'] - storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null - storePassword keystoreProperties['storePassword'] - } - } +// signingConfigs { +// release { +// keyAlias keystoreProperties['keyAlias'] +// keyPassword keystoreProperties['keyPassword'] +// storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null +// storePassword keystoreProperties['storePassword'] +// } +// } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.release +// signingConfig signingConfigs.release minifyEnabled true // Enable code shrinking for smaller APKs proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } diff --git a/lib/presentation/Screens/auth_verification/changepassword.dart b/lib/presentation/Screens/auth_verification/changepassword.dart index 9b86c2e1..225c143a 100644 --- a/lib/presentation/Screens/auth_verification/changepassword.dart +++ b/lib/presentation/Screens/auth_verification/changepassword.dart @@ -189,7 +189,7 @@ class _ResetPasswordScreenState extends State { decoration: InputDecoration( hintText: 'Enter your email', hintStyle: const TextStyle( - color: Colors.black38, + color: Color(0xFFC3C6CB), fontSize: 14, ), prefixIcon: const Icon( diff --git a/lib/presentation/Screens/auth_verification/confirm_password.dart b/lib/presentation/Screens/auth_verification/confirm_password.dart index cc04fa28..cef960e0 100644 --- a/lib/presentation/Screens/auth_verification/confirm_password.dart +++ b/lib/presentation/Screens/auth_verification/confirm_password.dart @@ -149,6 +149,10 @@ class _ConfirmPasswordState extends State { obscureText: _obscurePassword, decoration: InputDecoration( hintText: 'Enter your password', + hintStyle: const TextStyle( + color: Color(0xFFC3C6CB), + fontSize: 14, + ), prefixIcon: Icon( Icons.lock, color: Colors.blue, @@ -177,6 +181,10 @@ class _ConfirmPasswordState extends State { obscureText: _obscureConfirmPassword, decoration: InputDecoration( hintText: 'Confirm password', + hintStyle: const TextStyle( + color: Color(0xFFC3C6CB), + fontSize: 14, + ), prefixIcon: Icon( Icons.lock, color: Colors.blue, diff --git a/lib/presentation/Screens/auth_verification/registration.dart b/lib/presentation/Screens/auth_verification/registration.dart index 232e774f..36eb6a9a 100644 --- a/lib/presentation/Screens/auth_verification/registration.dart +++ b/lib/presentation/Screens/auth_verification/registration.dart @@ -575,7 +575,7 @@ class _RegisterScreenState extends ConsumerState { .shade300, ), ), - + // prefixIcon: Icon( // Icons.person, // color: Color(0xFF90B0D5), @@ -669,7 +669,7 @@ class _RegisterScreenState extends ConsumerState { .shade100, ), ), - + // border: OutlineInputBorder(), enabledBorder: OutlineInputBorder( borderRadius: @@ -761,7 +761,7 @@ class _RegisterScreenState extends ConsumerState { .shade300, ), ), - + // prefixIcon: Icon( // Icons.lock, // color: Color(0xFF90B0D5), @@ -773,19 +773,19 @@ class _RegisterScreenState extends ConsumerState { // : 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 = @@ -826,7 +826,7 @@ class _RegisterScreenState extends ConsumerState { width: 1), // Match the error color ), - + counterText: '', hintStyle: TextStyle( color: Color(0xFFC3C6CB), @@ -881,14 +881,14 @@ class _RegisterScreenState extends ConsumerState { .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, @@ -961,11 +961,11 @@ class _RegisterScreenState extends ConsumerState { padding: const EdgeInsets.only( top: 0, bottom: 10, - left: 25, + left: 15.5, right: 30), child: Row( - crossAxisAlignment: - CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Checkbox( value: isChecked, diff --git a/lib/presentation/Screens/charts/screens/chart_screen.dart b/lib/presentation/Screens/charts/screens/chart_screen.dart index 1859191b..5f1a715a 100644 --- a/lib/presentation/Screens/charts/screens/chart_screen.dart +++ b/lib/presentation/Screens/charts/screens/chart_screen.dart @@ -307,89 +307,101 @@ class _ChartScreen1State extends ConsumerState { ), ); } - +//when the popup need for bookmark + // void showAddBookmarkDialog() { + // double myheight = MediaQuery.of(context).size.height; + // showDialog( + // context: context, + // barrierDismissible: false, // User must tap button to dismiss dialog + // builder: (context) => AlertDialog( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(5.0), // Rounded corners + // ), + // contentPadding: EdgeInsets.zero, + // content: Stack( + // children: [ + // Padding( + // padding: const EdgeInsets.all(10.0), + // child: Column( + // mainAxisSize: MainAxisSize.min, + // children: [ + // SizedBox( + // height: myheight / 30, + // ), + // Text( + // context.translate( + // 'Do you want to add this to bookmarks?', + // 'هل تريد إضافة هذا إلى الإشارات المرجعية؟', + // ), + // textAlign: TextAlign.center, + // style: TextStyle( + // fontSize: 18, + // color: Color(0xFF898C81), + // ), + // ) + // ], + // ), + // ), + // ], + // ), + // actions: [ + // SizedBox(height: 20), + // SizedBox( + // width: 100, // Set the desired width + // child: TextButton( + // onPressed: () => Navigator.pop(context), + // style: TextButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular( + // 10.0), // Adjust the radius as needed + // ), + // side: BorderSide( + // color: Color(0xFFAA8E83), // Set the outline color + // width: 1, // Set the border width + // ), + // ), + // child: Text( + // context.translate('No', 'لا'), + // style: TextStyle( + // color: Color(0xFFAA8E83), + // fontSize: 16, + // ), + // ), + // ), + // ), + // SizedBox( + // width: 100, // Set the desired width + // child: TextButton( + // onPressed: () { + // Navigator.pop(context); + // addBookmark(); // Close dialog + // }, + // style: TextButton.styleFrom( + // backgroundColor: Color(0xFFAA8E83), // Set background color + // foregroundColor: Colors.white, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10.0), // Set text color + // ), + // ), + // child: Text( + // context.translate('Yes', 'نعم'), + // style: TextStyle(color: Colors.white, fontSize: 16), + // ), + // ), + // ), + // ], + // ), + // ); + // } void showAddBookmarkDialog() { - double myheight = MediaQuery.of(context).size.height; - showDialog( - context: context, - barrierDismissible: false, // User must tap button to dismiss dialog - builder: (context) => AlertDialog( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(5.0), // Rounded corners + addBookmark(); + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text( + 'The bookmark is added successfully', ), - contentPadding: EdgeInsets.zero, - content: Stack( - children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - height: myheight / 30, - ), - Text( - context.translate( - 'Do you want to add this to bookmarks?', - 'هل تريد إضافة هذا إلى الإشارات المرجعية؟', - ), - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 18, - color: Color(0xFF898C81), - ), - ) - ], - ), - ), - ], - ), - actions: [ - SizedBox(height: 20), - SizedBox( - width: 100, // Set the desired width - child: TextButton( - onPressed: () => Navigator.pop(context), - style: TextButton.styleFrom( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular( - 10.0), // Adjust the radius as needed - ), - side: BorderSide( - color: Color(0xFFAA8E83), // Set the outline color - width: 1, // Set the border width - ), - ), - child: Text( - context.translate('No', 'لا'), - style: TextStyle( - color: Color(0xFFAA8E83), - fontSize: 16, - ), - ), - ), - ), - SizedBox( - width: 100, // Set the desired width - child: TextButton( - onPressed: () { - Navigator.pop(context); - addBookmark(); // Close dialog - }, - style: TextButton.styleFrom( - backgroundColor: Color(0xFFAA8E83), // Set background color - foregroundColor: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), // Set text color - ), - ), - child: Text( - context.translate('Yes', 'نعم'), - style: TextStyle(color: Colors.white, fontSize: 16), - ), - ), - ), - ], + backgroundColor: Colors.green, + duration: Duration(seconds: 2), ), ); } diff --git a/lib/presentation/Screens/profilepage.dart b/lib/presentation/Screens/profilepage.dart index f6954c85..6a1ec4a6 100644 --- a/lib/presentation/Screens/profilepage.dart +++ b/lib/presentation/Screens/profilepage.dart @@ -601,7 +601,10 @@ class _ProfileScreenState extends ConsumerState { focusNode: _focusNodes[0], decoration: InputDecoration( // hintText: _showHints[0] ? 'Enter the User Name' : null, - hintStyle: TextStyle(color: Colors.grey), + hintStyle: const TextStyle( + color: Color(0xFFC3C6CB), + fontSize: 14, + ), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), @@ -628,7 +631,10 @@ class _ProfileScreenState extends ConsumerState { decoration: InputDecoration( // hintText: // _showHints[1] ? 'mohammad.hassan@fcsc.gov.ae' : null, - hintStyle: TextStyle(color: Colors.grey), + hintStyle: const TextStyle( + color: Color(0xFFC3C6CB), + fontSize: 14, + ), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), @@ -676,7 +682,10 @@ class _ProfileScreenState extends ConsumerState { width: 1), // Enabled border ), hintText: _showHints[2] ? 'Enter the name' : null, - hintStyle: TextStyle(color: Colors.grey), + hintStyle: const TextStyle( + color: Color(0xFFC3C6CB), + fontSize: 14, + ), border: OutlineInputBorder( borderSide:BorderSide(color: Color(0xFF7296BE), ), @@ -722,7 +731,10 @@ class _ProfileScreenState extends ConsumerState { ), hintText: _showHints[3] ? 'DD/MM/YYYY' : null, //_showHints[3] ? 'Select your Date of Birth' : null, - hintStyle: TextStyle(color: Colors.grey), + hintStyle: const TextStyle( + color: Color(0xFFC3C6CB), + fontSize: 14, + ), suffixIcon: Container( width: 45, diff --git a/lib/presentation/routes/auth_routes/login_route.dart b/lib/presentation/routes/auth_routes/login_route.dart index 330bd057..df4ecb23 100644 --- a/lib/presentation/routes/auth_routes/login_route.dart +++ b/lib/presentation/routes/auth_routes/login_route.dart @@ -471,6 +471,7 @@ class LoginRoute extends HookConsumerWidget { 'Email', 'بريد إلكتروني', ), + validator: (value) { if (value == null || value.isEmpty) { return context.translate('Required', 'مطلوب'); diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart b/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart index 45f9b0da..cf44f52a 100644 --- a/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart +++ b/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart @@ -140,90 +140,90 @@ class _BookMarkState extends ConsumerState { } /// Show confirmation dialog before removing bookmark - void showRemoveBookmarkDialog(id) { - double myheight = MediaQuery.of(context).size.height; - showDialog( - context: context, - barrierDismissible: false, // User must tap button to dismiss dialog - builder: (context) => AlertDialog( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(5.0), // Rounded corners - ), - contentPadding: EdgeInsets.zero, - content: Stack( - children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - height: myheight / 30, - ), - Text( - context.translate( - 'Are you sure you want to remove this bookmark?', - 'هل أنت متأكد أنك تريد إزالة هذه الإشارة المرجعية؟'), - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 18, - color: Color(0xFF898C81), - ), - ) - ], - ), - ), - ], - ), - actions: [ - SizedBox(height: 20), - SizedBox( - width: 100, // Set the desired width - child: TextButton( - onPressed: () => Navigator.pop(context), - style: TextButton.styleFrom( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular( - 10.0), // Adjust the radius as needed - ), - side: BorderSide( - color: Color(0xFFAA8E83), // Set the outline color - width: 1, // Set the border width - ), - ), - child: Text( - context.translate('No', 'لا'), - style: TextStyle( - color: Color(0xFFAA8E83), - fontSize: 16, - ), - ), - ), - ), - SizedBox( - width: 100, // Set the desired width - child: TextButton( - onPressed: () { - Navigator.pop(context); - removeBookmark(id); // Close dialog - }, - style: TextButton.styleFrom( - backgroundColor: Color(0xFFAA8E83), // Set background color - foregroundColor: Colors.white, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), // Set text color - ), - ), - child: Text( - context.translate('Yes', 'نعم'), - style: TextStyle(color: Colors.white, fontSize: 16), - ), - ), - ), - ], - ), - ); - } + // void showRemoveBookmarkDialog(id) { + // double myheight = MediaQuery.of(context).size.height; + // showDialog( + // context: context, + // barrierDismissible: false, // User must tap button to dismiss dialog + // builder: (context) => AlertDialog( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(5.0), // Rounded corners + // ), + // contentPadding: EdgeInsets.zero, + // content: Stack( + // children: [ + // Padding( + // padding: const EdgeInsets.all(10.0), + // child: Column( + // mainAxisSize: MainAxisSize.min, + // children: [ + // SizedBox( + // height: myheight / 30, + // ), + // Text( + // context.translate( + // 'Are you sure you want to remove this bookmark?', + // 'هل أنت متأكد أنك تريد إزالة هذه الإشارة المرجعية؟'), + // textAlign: TextAlign.center, + // style: TextStyle( + // fontSize: 18, + // color: Color(0xFF898C81), + // ), + // ) + // ], + // ), + // ), + // ], + // ), + // actions: [ + // SizedBox(height: 20), + // SizedBox( + // width: 100, // Set the desired width + // child: TextButton( + // onPressed: () => Navigator.pop(context), + // style: TextButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular( + // 10.0), // Adjust the radius as needed + // ), + // side: BorderSide( + // color: Color(0xFFAA8E83), // Set the outline color + // width: 1, // Set the border width + // ), + // ), + // child: Text( + // context.translate('No', 'لا'), + // style: TextStyle( + // color: Color(0xFFAA8E83), + // fontSize: 16, + // ), + // ), + // ), + // ), + // SizedBox( + // width: 100, // Set the desired width + // child: TextButton( + // onPressed: () { + // Navigator.pop(context); + // removeBookmark(id); // Close dialog + // }, + // style: TextButton.styleFrom( + // backgroundColor: Color(0xFFAA8E83), // Set background color + // foregroundColor: Colors.white, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10.0), // Set text color + // ), + // ), + // child: Text( + // context.translate('Yes', 'نعم'), + // style: TextStyle(color: Colors.white, fontSize: 16), + // ), + // ), + // ), + // ], + // ), + // ); + // } String colorToHex(Color color) { return '0xFF${color.red.toRadixString(16).padLeft(2, '0').toUpperCase()}' @@ -325,7 +325,16 @@ class _BookMarkState extends ConsumerState { GestureDetector( onTap: () { debugPrint("Icon clicked in: ${data['title']}"); - showRemoveBookmarkDialog(data['id']); + removeBookmark(data['id']); + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text( + 'The bookmark is removed successfully', + ), + backgroundColor: Colors.green, + duration: Duration(seconds: 2), + ), + ); }, child: const Icon( Icons.bookmarks_rounded, @@ -333,6 +342,18 @@ class _BookMarkState extends ConsumerState { size: 20, ), ), + + // GestureDetector( + // onTap: () { + // debugPrint("Icon clicked in: ${data['title']}"); + // // showRemoveBookmarkDialog(data['id']); + // }, + // child: const Icon( + // Icons.bookmarks_rounded, + // color: Colors.black, + // size: 20, + // ), + // ), ], ), Text( diff --git a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart index 90d5a899..1b369d46 100644 --- a/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart +++ b/lib/presentation/routes/drawer_routes/custom_drawer_routes.dart @@ -811,6 +811,8 @@ class _BaseScaffoldState extends ConsumerState { Text( userEmail ?? 'Loading...', style: TextStyle(fontSize: 12), + // maxLines: 2, // Allow the text to wrap to the next line + overflow: TextOverflow.ellipsis, ), ] ], diff --git a/lib/presentation/routes/drawer_routes/manage_user_router.dart b/lib/presentation/routes/drawer_routes/manage_user_router.dart index 9d0ace46..059a0e71 100644 --- a/lib/presentation/routes/drawer_routes/manage_user_router.dart +++ b/lib/presentation/routes/drawer_routes/manage_user_router.dart @@ -163,6 +163,10 @@ class _ManageUserRouterState extends State { decoration: InputDecoration( prefixIcon: const Icon(Icons.search), hintText: 'Search', + hintStyle: const TextStyle( + color: Color(0xFFC3C6CB), + fontSize: 14, + ), border: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(20)), ),