This commit is contained in:
Juki-shiba 2025-02-17 16:24:54 +05:30
parent 3779e17108
commit 0bef09eac0
10 changed files with 255 additions and 195 deletions

View File

@ -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'
}

View File

@ -189,7 +189,7 @@ class _ResetPasswordScreenState extends State<Changepassword> {
decoration: InputDecoration(
hintText: 'Enter your email',
hintStyle: const TextStyle(
color: Colors.black38,
color: Color(0xFFC3C6CB),
fontSize: 14,
),
prefixIcon: const Icon(

View File

@ -149,6 +149,10 @@ class _ConfirmPasswordState extends State<ConfirmPassword> {
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<ConfirmPassword> {
obscureText: _obscureConfirmPassword,
decoration: InputDecoration(
hintText: 'Confirm password',
hintStyle: const TextStyle(
color: Color(0xFFC3C6CB),
fontSize: 14,
),
prefixIcon: Icon(
Icons.lock,
color: Colors.blue,

View File

@ -575,7 +575,7 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
.shade300,
),
),
// prefixIcon: Icon(
// Icons.person,
// color: Color(0xFF90B0D5),
@ -669,7 +669,7 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
.shade100,
),
),
// border: OutlineInputBorder(),
enabledBorder: OutlineInputBorder(
borderRadius:
@ -761,7 +761,7 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
.shade300,
),
),
// prefixIcon: Icon(
// Icons.lock,
// color: Color(0xFF90B0D5),
@ -773,19 +773,19 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
// : 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<RegisterScreen> {
width:
1), // Match the error color
),
counterText: '',
hintStyle: TextStyle(
color: Color(0xFFC3C6CB),
@ -881,14 +881,14 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
.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<RegisterScreen> {
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,

View File

@ -307,89 +307,101 @@ class _ChartScreen1State extends ConsumerState<ChartScreen1> {
),
);
}
//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),
),
);
}

View File

@ -601,7 +601,10 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
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<ProfileScreen> {
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<ProfileScreen> {
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<ProfileScreen> {
),
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,

View File

@ -471,6 +471,7 @@ class LoginRoute extends HookConsumerWidget {
'Email',
'بريد إلكتروني',
),
validator: (value) {
if (value == null || value.isEmpty) {
return context.translate('Required', 'مطلوب');

View File

@ -140,90 +140,90 @@ class _BookMarkState extends ConsumerState<BookMark> {
}
/// 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<BookMark> {
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<BookMark> {
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(

View File

@ -811,6 +811,8 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
Text(
userEmail ?? 'Loading...',
style: TextStyle(fontSize: 12),
// maxLines: 2, // Allow the text to wrap to the next line
overflow: TextOverflow.ellipsis,
),
]
],

View File

@ -163,6 +163,10 @@ class _ManageUserRouterState extends State<ManageUserRouter> {
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)),
),