charts and ui changes

This commit is contained in:
venbaittech 2025-02-18 09:40:07 +05:30
commit feca758194
10 changed files with 247 additions and 186 deletions

View File

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

View File

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

View File

@ -575,7 +575,7 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
.shade300, .shade300,
), ),
), ),
// prefixIcon: Icon( // prefixIcon: Icon(
// Icons.person, // Icons.person,
// color: Color(0xFF90B0D5), // color: Color(0xFF90B0D5),
@ -669,7 +669,7 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
.shade100, .shade100,
), ),
), ),
// border: OutlineInputBorder(), // border: OutlineInputBorder(),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: borderRadius:
@ -761,7 +761,7 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
.shade300, .shade300,
), ),
), ),
// prefixIcon: Icon( // prefixIcon: Icon(
// Icons.lock, // Icons.lock,
// color: Color(0xFF90B0D5), // color: Color(0xFF90B0D5),
@ -773,19 +773,19 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
// : Icons.visibility, // : Icons.visibility,
// color: Color(0xFF9EA2A9), // color: Color(0xFF9EA2A9),
// ), // ),
icon: Image.asset( icon: Image.asset(
_obscurePassword _obscurePassword
? MiscIconAssetPath ? MiscIconAssetPath
.visibilityOff .visibilityOff
: MiscIconAssetPath.visibleOn, : MiscIconAssetPath.visibleOn,
color: Color( color: Color(
0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly. 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly.
width: 24, width: 24,
height: 24, height: 24,
), ),
onPressed: () { onPressed: () {
setState(() { setState(() {
_obscurePassword = _obscurePassword =
@ -826,7 +826,7 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
width: width:
1), // Match the error color 1), // Match the error color
), ),
counterText: '', counterText: '',
hintStyle: TextStyle( hintStyle: TextStyle(
color: Color(0xFFC3C6CB), color: Color(0xFFC3C6CB),
@ -881,14 +881,14 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
.shade300, .shade300,
), ),
), ),
suffixIcon: IconButton( suffixIcon: IconButton(
icon: Image.asset( icon: Image.asset(
_obscureConfirmPassword _obscureConfirmPassword
? MiscIconAssetPath ? MiscIconAssetPath
.visibilityOff .visibilityOff
: MiscIconAssetPath.visibleOn, : MiscIconAssetPath.visibleOn,
color: Color( color: Color(
0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly. 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly.
width: 24, width: 24,
@ -961,11 +961,11 @@ class _RegisterScreenState extends ConsumerState<RegisterScreen> {
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
top: 0, top: 0,
bottom: 10, bottom: 10,
left: 25, left: 15.5,
right: 30), right: 30),
child: Row( child: Row(
crossAxisAlignment: mainAxisAlignment: MainAxisAlignment.center,
CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Checkbox( Checkbox(
value: isChecked, value: isChecked,

View File

@ -309,89 +309,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() { void showAddBookmarkDialog() {
double myheight = MediaQuery.of(context).size.height; addBookmark();
showDialog( ScaffoldMessenger.of(context).showSnackBar(
context: context, SnackBar(
barrierDismissible: false, // User must tap button to dismiss dialog content: Text(
builder: (context) => AlertDialog( 'The bookmark is added successfully',
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0), // Rounded corners
), ),
contentPadding: EdgeInsets.zero, backgroundColor: Colors.green,
content: Stack( duration: Duration(seconds: 2),
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),
),
),
),
],
), ),
); );
} }

View File

@ -601,7 +601,10 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
focusNode: _focusNodes[0], focusNode: _focusNodes[0],
decoration: InputDecoration( decoration: InputDecoration(
// hintText: _showHints[0] ? 'Enter the User Name' : null, // hintText: _showHints[0] ? 'Enter the User Name' : null,
hintStyle: TextStyle(color: Colors.grey), hintStyle: const TextStyle(
color: Color(0xFFC3C6CB),
fontSize: 14,
),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
@ -628,7 +631,10 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
decoration: InputDecoration( decoration: InputDecoration(
// hintText: // hintText:
// _showHints[1] ? 'mohammad.hassan@fcsc.gov.ae' : null, // _showHints[1] ? 'mohammad.hassan@fcsc.gov.ae' : null,
hintStyle: TextStyle(color: Colors.grey), hintStyle: const TextStyle(
color: Color(0xFFC3C6CB),
fontSize: 14,
),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
@ -676,7 +682,10 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
width: 1), // Enabled border width: 1), // Enabled border
), ),
hintText: _showHints[2] ? 'Enter the name' : null, hintText: _showHints[2] ? 'Enter the name' : null,
hintStyle: TextStyle(color: Colors.grey), hintStyle: const TextStyle(
color: Color(0xFFC3C6CB),
fontSize: 14,
),
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide:BorderSide(color: Color(0xFF7296BE), borderSide:BorderSide(color: Color(0xFF7296BE),
), ),
@ -722,7 +731,10 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
), ),
hintText: _showHints[3] ? 'DD/MM/YYYY' : null, hintText: _showHints[3] ? 'DD/MM/YYYY' : null,
//_showHints[3] ? 'Select your Date of Birth' : null, //_showHints[3] ? 'Select your Date of Birth' : null,
hintStyle: TextStyle(color: Colors.grey), hintStyle: const TextStyle(
color: Color(0xFFC3C6CB),
fontSize: 14,
),
suffixIcon: Container( suffixIcon: Container(
width: 45, width: 45,

View File

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

View File

@ -140,90 +140,90 @@ class _BookMarkState extends ConsumerState<BookMark> {
} }
/// Show confirmation dialog before removing bookmark /// Show confirmation dialog before removing bookmark
void showRemoveBookmarkDialog(id) { // void showRemoveBookmarkDialog(id) {
double myheight = MediaQuery.of(context).size.height; // double myheight = MediaQuery.of(context).size.height;
showDialog( // showDialog(
context: context, // context: context,
barrierDismissible: false, // User must tap button to dismiss dialog // barrierDismissible: false, // User must tap button to dismiss dialog
builder: (context) => AlertDialog( // builder: (context) => AlertDialog(
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0), // Rounded corners // borderRadius: BorderRadius.circular(5.0), // Rounded corners
), // ),
contentPadding: EdgeInsets.zero, // contentPadding: EdgeInsets.zero,
content: Stack( // content: Stack(
children: [ // children: [
Padding( // Padding(
padding: const EdgeInsets.all(10.0), // padding: const EdgeInsets.all(10.0),
child: Column( // child: Column(
mainAxisSize: MainAxisSize.min, // mainAxisSize: MainAxisSize.min,
children: [ // children: [
SizedBox( // SizedBox(
height: myheight / 30, // height: myheight / 30,
), // ),
Text( // Text(
context.translate( // context.translate(
'Are you sure you want to remove this bookmark?', // 'Are you sure you want to remove this bookmark?',
'هل أنت متأكد أنك تريد إزالة هذه الإشارة المرجعية؟'), // 'هل أنت متأكد أنك تريد إزالة هذه الإشارة المرجعية؟'),
textAlign: TextAlign.center, // textAlign: TextAlign.center,
style: TextStyle( // style: TextStyle(
fontSize: 18, // fontSize: 18,
color: Color(0xFF898C81), // color: Color(0xFF898C81),
), // ),
) // )
], // ],
), // ),
), // ),
], // ],
), // ),
actions: [ // actions: [
SizedBox(height: 20), // SizedBox(height: 20),
SizedBox( // SizedBox(
width: 100, // Set the desired width // width: 100, // Set the desired width
child: TextButton( // child: TextButton(
onPressed: () => Navigator.pop(context), // onPressed: () => Navigator.pop(context),
style: TextButton.styleFrom( // style: TextButton.styleFrom(
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular( // borderRadius: BorderRadius.circular(
10.0), // Adjust the radius as needed // 10.0), // Adjust the radius as needed
), // ),
side: BorderSide( // side: BorderSide(
color: Color(0xFFAA8E83), // Set the outline color // color: Color(0xFFAA8E83), // Set the outline color
width: 1, // Set the border width // width: 1, // Set the border width
), // ),
), // ),
child: Text( // child: Text(
context.translate('No', 'لا'), // context.translate('No', 'لا'),
style: TextStyle( // style: TextStyle(
color: Color(0xFFAA8E83), // color: Color(0xFFAA8E83),
fontSize: 16, // fontSize: 16,
), // ),
), // ),
), // ),
), // ),
SizedBox( // SizedBox(
width: 100, // Set the desired width // width: 100, // Set the desired width
child: TextButton( // child: TextButton(
onPressed: () { // onPressed: () {
Navigator.pop(context); // Navigator.pop(context);
removeBookmark(id); // Close dialog // removeBookmark(id); // Close dialog
}, // },
style: TextButton.styleFrom( // style: TextButton.styleFrom(
backgroundColor: Color(0xFFAA8E83), // Set background color // backgroundColor: Color(0xFFAA8E83), // Set background color
foregroundColor: Colors.white, // foregroundColor: Colors.white,
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), // Set text color // borderRadius: BorderRadius.circular(10.0), // Set text color
), // ),
), // ),
child: Text( // child: Text(
context.translate('Yes', 'نعم'), // context.translate('Yes', 'نعم'),
style: TextStyle(color: Colors.white, fontSize: 16), // style: TextStyle(color: Colors.white, fontSize: 16),
), // ),
), // ),
), // ),
], // ],
), // ),
); // );
} // }
String colorToHex(Color color) { String colorToHex(Color color) {
return '0xFF${color.red.toRadixString(16).padLeft(2, '0').toUpperCase()}' return '0xFF${color.red.toRadixString(16).padLeft(2, '0').toUpperCase()}'
@ -325,7 +325,16 @@ class _BookMarkState extends ConsumerState<BookMark> {
GestureDetector( GestureDetector(
onTap: () { onTap: () {
debugPrint("Icon clicked in: ${data['title']}"); 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( child: const Icon(
Icons.bookmarks_rounded, Icons.bookmarks_rounded,
@ -333,6 +342,18 @@ class _BookMarkState extends ConsumerState<BookMark> {
size: 20, 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( Text(

View File

@ -341,9 +341,10 @@ class _ManageUserRouterState extends State<ManageUserRouter> {
child: TextField( child: TextField(
decoration: InputDecoration( decoration: InputDecoration(
hintText: "Search", hintText: "Search",
hintStyle: TextStyle(color: Color(0xFF898C81)), hintStyle: const TextStyle(
color: Color(0xFFC3C6CB),
fontSize: 14,
),
prefixIcon: Image( prefixIcon: Image(
image: ExactAssetImage(MiscIconAssetPath.search), image: ExactAssetImage(MiscIconAssetPath.search),
width: 24, width: 24,

View File

@ -811,6 +811,8 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
Text( Text(
userEmail ?? 'Loading...', userEmail ?? 'Loading...',
style: TextStyle(fontSize: 12), 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( decoration: InputDecoration(
prefixIcon: const Icon(Icons.search), prefixIcon: const Icon(Icons.search),
hintText: 'Search', hintText: 'Search',
hintStyle: const TextStyle(
color: Color(0xFFC3C6CB),
fontSize: 14,
),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(20)), borderRadius: BorderRadius.all(Radius.circular(20)),
), ),