diff --git a/assets/images/EID_ARABIC_3.svg b/assets/images/EID_ARABIC_3.svg
new file mode 100644
index 0000000..483a836
--- /dev/null
+++ b/assets/images/EID_ARABIC_3.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/images/EID_Englsih_04.svg b/assets/images/EID_Englsih_04.svg
new file mode 100644
index 0000000..c2a75b5
--- /dev/null
+++ b/assets/images/EID_Englsih_04.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/assets/images/asddasd.svg b/assets/images/asddasd.svg
new file mode 100644
index 0000000..b91a675
--- /dev/null
+++ b/assets/images/asddasd.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/images/eid_banner.svg b/assets/images/eid_banner.svg
new file mode 100644
index 0000000..f8e4adb
--- /dev/null
+++ b/assets/images/eid_banner.svg
@@ -0,0 +1,606 @@
+
diff --git a/lib/app_state/app_state.dart b/lib/app_state/app_state.dart
index 799bcb5..5ce6861 100644
--- a/lib/app_state/app_state.dart
+++ b/lib/app_state/app_state.dart
@@ -90,7 +90,7 @@ class AppState {
String get getHuaweiPushToken => _huaweiPushToken;
- final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 9.5, mobileType: Platform.isAndroid ? "android" : "ios");
+ final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 9.7, mobileType: Platform.isAndroid ? "android" : "ios");
void setPostParamsInitConfig() {
isAuthenticated = false;
diff --git a/lib/provider/dashboard_provider_model.dart b/lib/provider/dashboard_provider_model.dart
index 965fe52..e0224c0 100644
--- a/lib/provider/dashboard_provider_model.dart
+++ b/lib/provider/dashboard_provider_model.dart
@@ -138,7 +138,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.keen.tr(), AppRoutes.etqanOvr),
// DrawerMenuItem("assets/images/drawer/car_parking_icon.svg", LocaleKeys.parkingQr.tr(), AppRoutes.parkingQr),
DrawerMenuItem("assets/images/drawer/pending_trasactions.svg", LocaleKeys.pendingTransactions.tr(), AppRoutes.pendingTransactions),
- DrawerMenuItem("assets/images/drawer/courses.svg", "courses".tr(), AppRoutes.courses),
+ // DrawerMenuItem("assets/images/drawer/courses.svg", "courses".tr(), AppRoutes.courses),
// DrawerMenuItem("assets/images/drawer/drawer_marathon.svg", LocaleKeys.brainMarathon.tr(), AppRoutes.marathonIntroScreen),
DrawerMenuItem("assets/images/drawer/change_password.svg", LocaleKeys.changePassword.tr(), AppRoutes.changePassword),
];
diff --git a/lib/ui/etqan_ovr/etqan_create_request.dart b/lib/ui/etqan_ovr/etqan_create_request.dart
index a1d64af..ba3c504 100644
--- a/lib/ui/etqan_ovr/etqan_create_request.dart
+++ b/lib/ui/etqan_ovr/etqan_create_request.dart
@@ -110,15 +110,20 @@ class _EtqanOvrCreateRequestState extends State {
if (ticketInfo != null) {
String ticketNumber = ticketInfo['ticketNumber'] ?? '';
String ticketId = ticketInfo['id'] ?? '';
- String successMessage = '${LocaleKeys.requestCreatedSuccessfully.tr()}\n\n${LocaleKeys.ticketNumber.tr()}: $ticketNumber\n${LocaleKeys.ticketId.tr()}: $ticketId';
+ // String successMessage = '${LocaleKeys.requestCreatedSuccessfully.tr()}\n\n${LocaleKeys.ticketNumber.tr()}: $ticketNumber\n${LocaleKeys.ticketId.tr()}: $ticketId';
+ String successMessage = '${LocaleKeys.requestCreatedSuccessfully.tr()}\n\n${LocaleKeys.ticketNumber.tr()}: $ticketNumber';
Utils.showErrorDialog(
context: context,
message: successMessage,
onOkTapped: () {
- Navigator.popAndPushNamed(context, AppRoutes.etqanOvr);
+ Navigator.pop(context);
+ Navigator.pop(context);
+ // Navigator.popAndPushNamed(context, AppRoutes.etqanOvr);
},
onCloseTap: () {
- Navigator.popAndPushNamed(context, AppRoutes.etqanOvr);
+ Navigator.pop(context);
+ Navigator.pop(context);
+ // Navigator.popAndPushNamed(context, AppRoutes.etqanOvr);
},
);
}
diff --git a/lib/ui/landing/dashboard_screen.dart b/lib/ui/landing/dashboard_screen.dart
index e053b8c..0aafcef 100644
--- a/lib/ui/landing/dashboard_screen.dart
+++ b/lib/ui/landing/dashboard_screen.dart
@@ -431,86 +431,24 @@ class _DashboardScreenState extends State with WidgetsBindingOb
return const GreetingCardShimmer();
} else if (model.isDisplayEidGreetings && model.greetingCardsList != null && model.greetingCardsList!.isNotEmpty) {
return SizedBox(
- height: 120,
+ height: 140,
child: ListView.separated(
shrinkWrap: true,
scrollDirection: Axis.horizontal,
- padding: const EdgeInsets.symmetric(horizontal: 21),
+ padding: const EdgeInsets.symmetric(horizontal: 0),
itemCount: model.greetingCardsList!.length,
- separatorBuilder: (context, index) => const SizedBox(width: 12),
+ separatorBuilder: (context, index) => const SizedBox(width: 24),
itemBuilder: (context, index) {
var card = model.greetingCardsList![index];
- return SizedBox(
- width: MediaQuery.of(context).size.width - 42,
- child: Directionality(
- textDirection: AppState().isArabic(context) ? ui.TextDirection.rtl : ui.TextDirection.ltr,
- child: Stack(
- children: [
- Transform.flip(
- flipX: !AppState().isArabic(context),
- child: SvgPicture.network(
- AppState().isArabic(context)
- ? (card.backgroundImageUrlAr ?? "http://meena-health-care-1.s3.eu-north-1.amazonaws.com/eid_banner.svg")
- : (card.backgroundImageUrlEn ?? "http://meena-health-care-1.s3.eu-north-1.amazonaws.com/eid_banner.svg"),
- fit: BoxFit.contain,
- placeholderBuilder: (context) => ClipRRect(borderRadius: BorderRadius.circular(18), child: Container(height: 80, color: Colors.white).toShimmer()),
- ),
- ),
- Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- SizedBox(width: AppState().isArabic(context) ? 10 : 40),
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Text(
- AppState().isArabic(context) ? card.titleAr ?? '' : card.titleEn ?? '',
- style: TextStyle(
- fontSize: AppState().isArabic(context) ? 20 : 18,
- letterSpacing: -0.2,
- fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins',
- fontWeight: FontWeight.w700,
- height: 24 / 16,
- color: const Color(0xFF3B3E4F),
- ),
- ),
- const SizedBox(height: 4),
- Text(
- AppState().isArabic(context) ? card.descriptionAr ?? '' : card.descriptionEn ?? '',
- style: TextStyle(
- fontSize: AppState().isArabic(context) ? 16 : 14,
- letterSpacing: -0.2,
- fontFamily: AppState().isArabic(context) ? 'Cairo' : 'Poppins',
- fontWeight: FontWeight.w500,
- color: const Color(0xFF3B3E4F),
- ),
- maxLines: 2,
- overflow: TextOverflow.ellipsis,
- ),
- ],
- ),
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.end,
- mainAxisAlignment: MainAxisAlignment.end,
- children: [
- (AppState().isArabic(context)
- ? card.buttonTextN!.toText12(isUnderLine: true, color: const Color(0xFF3B3D4A))
- : card.buttonText!.toText12(isUnderLine: true, color: const Color(0xFF3B3D4A)))
- .onPress(() {
- launchUrl(Uri.parse(AppState().isArabic(context) ? card.urlAr! : card.urlEn!));
- }),
- ],
- ).paddingOnly(bottom: 10, right: 15, left: 15),
- ],
- ).paddingOnly(left: AppState().isArabic(context) ? 10 : 36, right: AppState().isArabic(context) ? 66 : 10, top: 6, bottom: 40),
- ],
- ),
- ),
- );
+ return SvgPicture.network(
+ AppState().isArabic(context)
+ ? (card.backgroundImageUrlAr ?? "https://www.hmg.com/Lists/CS_Greeting_Cards/Attachments/5/CS_Ramadan_26.jpg")
+ : (card.backgroundImageUrlEn ?? "https://www.hmg.com/Lists/CS_Greeting_Cards/Attachments/5/CS_Ramadan_26.jpg"),
+ fit: BoxFit.contain,
+ placeholderBuilder: (context) => ClipRRect(borderRadius: BorderRadius.circular(18), child: Container(height: 80, color: Colors.white).toShimmer()),
+ ).onPress(() {
+ launchUrl(Uri.parse(AppState().isArabic(context) ? card.urlAr! : card.urlEn!));
+ });
},
),
).paddingOnly(bottom: 0);
@@ -518,8 +456,7 @@ class _DashboardScreenState extends State with WidgetsBindingOb
return const SizedBox();
}
},
- ),
-
+ ).paddingOnly(bottom: 24),
// eventActivityWidget(context),
if (isDisplayMazaya) ...[
Column(
diff --git a/lib/ui/screens/mowadhafhi/mowadhafhi_hr_request.dart b/lib/ui/screens/mowadhafhi/mowadhafhi_hr_request.dart
index e7d2fde..b358843 100644
--- a/lib/ui/screens/mowadhafhi/mowadhafhi_hr_request.dart
+++ b/lib/ui/screens/mowadhafhi/mowadhafhi_hr_request.dart
@@ -192,10 +192,78 @@ class _MowadhafhiHRRequestState extends State {
title.toText16().expanded,
6.width,
SimpleButton(LocaleKeys.add.tr(), () async {
- FilePickerResult? result = await FilePicker.platform.pickFiles(allowMultiple: true);
+ FilePickerResult? result = await FilePicker.platform.pickFiles(
+ allowMultiple: true,
+ );
if (result != null) {
- attachmentFiles = attachmentFiles + result.paths.map((path) => File(path!)).toList();
- attachmentFiles = attachmentFiles.toSet().toList();
+ // Maximum file size: 2 MB (in bytes)
+ const int maxFileSizeInBytes = 2 * 1024 * 1024; // 2 MB = 2097152 bytes
+ List newFiles = [];
+ List oversizedFiles = [];
+
+ for (PlatformFile platformFile in result.files) {
+ if (platformFile.path != null) {
+ File file = File(platformFile.path!);
+
+ // Get file size - check multiple sources for iOS compatibility
+ int fileSize = 0;
+
+ // Method 1: Check platformFile.size first
+ if (platformFile.size > 0) {
+ fileSize = platformFile.size;
+ debugPrint('Using platformFile.size: $fileSize bytes');
+ }
+
+ // Method 2: Always verify with file.length() as well
+ try {
+ int fileLengthSize = await file.length();
+ debugPrint('Using file.length(): $fileLengthSize bytes');
+ // Use the maximum of both to ensure we catch the real size
+ if (fileLengthSize > fileSize) {
+ fileSize = fileLengthSize;
+ debugPrint('Using larger value from file.length()');
+ }
+ } catch (e) {
+ debugPrint('Error getting file.length(): $e');
+ // If file.length() fails, rely on platformFile.size
+ if (fileSize == 0) {
+ debugPrint('Cannot determine file size, rejecting file: ${platformFile.name}');
+ oversizedFiles.add('${platformFile.name} (unknown size)');
+ continue;
+ }
+ }
+
+ double fileSizeMB = fileSize / (1024 * 1024);
+ debugPrint('Final file size - ${platformFile.name}: $fileSize bytes (${fileSizeMB.toStringAsFixed(2)} MB)');
+
+ // STRICT validation: Only accept files that are 2 MB or less
+ if (fileSize > 0 && fileSize <= maxFileSizeInBytes) {
+ debugPrint('✓ File accepted: ${platformFile.name}');
+ newFiles.add(file);
+ } else if (fileSize > maxFileSizeInBytes) {
+ debugPrint('✗ File REJECTED (too large): ${platformFile.name} - ${fileSizeMB.toStringAsFixed(2)} MB');
+ oversizedFiles.add('${platformFile.name} (${fileSizeMB.toStringAsFixed(2)} MB)');
+ } else {
+ debugPrint('✗ File REJECTED (invalid size): ${platformFile.name}');
+ oversizedFiles.add('${platformFile.name} (invalid)');
+ }
+ }
+ }
+
+ // Only add valid files
+ if (newFiles.isNotEmpty) {
+ attachmentFiles = attachmentFiles + newFiles;
+ attachmentFiles = attachmentFiles.toSet().toList();
+ debugPrint('Total files attached: ${attachmentFiles.length}');
+ }
+
+ // Show error message for rejected files
+ if (oversizedFiles.isNotEmpty) {
+ String fileList = oversizedFiles.join('\n');
+ Utils.showToast('Max 2MB File allowed.');
+ debugPrint('Total rejected files: ${oversizedFiles.length}');
+ }
+
setState(() {});
}
}, fontSize: 14),
diff --git a/pubspec.yaml b/pubspec.yaml
index 49dec60..7e5a29a 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 3.7.1+300081
+version: 3.7.2+300082
#version: 3.9.3+1
environment: