* 'master' of http://34.17.182.140/Haroon6138/HMG_Patient_App_New:
  Updates & fixes
  updates
  updates
  Push notification changes & updates
dev_sultan
Sultan khan 2 weeks ago
commit 08876b1ae4

@ -123,7 +123,7 @@
"forgotFileNoTitle": "نسيت الملف الطبي", "forgotFileNoTitle": "نسيت الملف الطبي",
"enterNationalId": "يرجى إدخال رقم الهاتف المحمول ورقم الهوية", "enterNationalId": "يرجى إدخال رقم الهاتف المحمول ورقم الهوية",
"profileInfo": "يرجى إدخال معلومات الملف الشخصي", "profileInfo": "يرجى إدخال معلومات الملف الشخصي",
"submit": "بحث", "submit": "تأكيد",
"forgotDesc": "أدخل رقم الهاتف المحمول لاستلام رقم الملف الطبي عبر الرسائل القصيرة", "forgotDesc": "أدخل رقم الهاتف المحمول لاستلام رقم الملف الطبي عبر الرسائل القصيرة",
"dob": "تاريخ الميلاد", "dob": "تاريخ الميلاد",
"hijriDate": "التاريخ الهجري", "hijriDate": "التاريخ الهجري",
@ -1390,7 +1390,6 @@
"medicalFiles": "الملفات الطبية", "medicalFiles": "الملفات الطبية",
"addANewFamilyMember": "اضافة", "addANewFamilyMember": "اضافة",
"viewInvoiceDetails": "عرض تفاصيل الفاتورة", "viewInvoiceDetails": "عرض تفاصيل الفاتورة",
"outPatient": "مريض خارجي",
"invoiceDetails": "تفاصيل الفاتورة", "invoiceDetails": "تفاصيل الفاتورة",
"sendingEmailPleaseWait": "جاري إرسال ال<D8A7><D984>ريد الإلكتروني، يرجى الانتظار...", "sendingEmailPleaseWait": "جاري إرسال ال<D8A7><D984>ريد الإلكتروني، يرجى الانتظار...",
"emailSentSuccessfullyMessage": "تم إرسال البريد الإلكتروني بنجاح.", "emailSentSuccessfullyMessage": "تم إرسال البريد الإلكتروني بنجاح.",
@ -1946,7 +1945,7 @@
"transactions": "المعاملات", "transactions": "المعاملات",
"pharmacy": "الصيدلية", "pharmacy": "الصيدلية",
"visitsOrders": "الزيارات/الطلبات", "visitsOrders": "الزيارات/الطلبات",
"earned": "حصل", "earned": "مكتسب",
"getParkingQR": "الحصول على رمز الاستجابة السريعة لوقوف السيارات", "getParkingQR": "الحصول على رمز الاستجابة السريعة لوقوف السيارات",
"cannotOpenThisFile": "لا يمكن فتح هذا الملف", "cannotOpenThisFile": "لا يمكن فتح هذا الملف",
"refundDetails": "تفاصيل الاسترداد", "refundDetails": "تفاصيل الاسترداد",

@ -5,7 +5,7 @@ import 'package:hmg_patient_app_new/core/enums.dart';
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT
@ -301,7 +301,7 @@ class ApiConsts {
static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations"; static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations";
// ************ static values for Api **************** // ************ static values for Api ****************
static final double appVersionID = 21.6; static final double appVersionID = 21.7;
// static final double appVersionID = 50.7; // static final double appVersionID = 50.7;
static final int appChannelId = 3; static final int appChannelId = 3;

@ -18,6 +18,10 @@ class TurnstileService {
// Initialize an instance of invisible Cloudflare Turnstile with your site key // Initialize an instance of invisible Cloudflare Turnstile with your site key
final turnstile = CloudflareTurnstile.invisible( final turnstile = CloudflareTurnstile.invisible(
siteKey: _siteKey, siteKey: _siteKey,
onTimeout: () {},
options: TurnstileOptions(
retryInterval: const Duration(milliseconds: 2000),
),
); );
try { try {

@ -19,7 +19,12 @@ import 'package:hmg_patient_app_new/core/api/api_client.dart';
import 'package:hmg_patient_app_new/core/api_consts.dart'; import 'package:hmg_patient_app_new/core/api_consts.dart';
import 'package:hmg_patient_app_new/core/cache_consts.dart'; import 'package:hmg_patient_app_new/core/cache_consts.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_model.dart';
import 'package:hmg_patient_app_new/presentation/notifications/notification_details_page.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:uuid/uuid.dart'; import 'package:uuid/uuid.dart';
@ -523,6 +528,26 @@ class PushNotificationHandler {
_incomingCall(remoteMessage.data); _incomingCall(remoteMessage.data);
// showCallkitIncoming(); // showCallkitIncoming();
} else { } else {
NotificationResponseModel notification = NotificationResponseModel();
notification.createdOn = DateUtil.convertDateToString(DateTime.now());
notification.isSentOn = DateUtil.convertDateToString(DateTime.now());
notification.messageTypeData = remoteMessage.data['picture'];
notification.messageType = notification.messageTypeData != null && notification.messageTypeData!.isNotEmpty ? "image" : "";
notification.message = remoteMessage.data['message'];
notification.notificationType = remoteMessage.data["NotificationType"].toString();
if (remoteMessage.data["NotificationType"] == "2") {
notification.videoURL = remoteMessage.data["VideoUrl"];
}
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).push(
CustomPageRoute(
page: NotificationDetailsPage(
notification: notification,
),
),
);
// GetNotificationsResponseModel notification = new GetNotificationsResponseModel(); // GetNotificationsResponseModel notification = new GetNotificationsResponseModel();
// //
// notification.createdOn = DateUtil.convertDateToString(DateTime.now()); // notification.createdOn = DateUtil.convertDateToString(DateTime.now());

@ -3,6 +3,7 @@ import 'dart:developer';
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show rootBundle; import 'package:flutter/services.dart' show rootBundle;
import 'package:get_it/get_it.dart'; import 'package:get_it/get_it.dart';
@ -979,12 +980,14 @@ class AuthenticationViewModel extends ChangeNotifier {
// TODO: GET APP SMS SIGNATURE HERE // TODO: GET APP SMS SIGNATURE HERE
request.sMSSignature = await getSignature(); request.sMSSignature = await getSignature();
// Get Turnstile token if configured if(!kDebugMode) {
final turnstileToken = await _turnstileService.getTurnstileToken(); // Get Turnstile token if configured
if (turnstileToken != null) { final turnstileToken = await _turnstileService.getTurnstileToken();
request.turnstileToken = turnstileToken; if (turnstileToken != null) {
} else { request.turnstileToken = turnstileToken;
request.turnstileToken = ""; } else {
request.turnstileToken = "";
}
} }
if (isNeedLoading) { if (isNeedLoading) {
@ -998,7 +1001,10 @@ class AuthenticationViewModel extends ChangeNotifier {
sendActivationCodeReq: request, isRegister: checkIsUserComingForRegister(request: payload), languageID: 'er', isFormFamilyFile: isFormFamilyFile); sendActivationCodeReq: request, isRegister: checkIsUserComingForRegister(request: payload), languageID: 'er', isFormFamilyFile: isFormFamilyFile);
resultEither.fold( resultEither.fold(
(failure) async => await _errorHandlerService.handleError(failure: failure), (failure) async {
LoaderBottomSheet.hideLoader();
await _errorHandlerService.handleError(failure: failure);
},
(apiResponse) async { (apiResponse) async {
if (isFormFamilyFile) { if (isFormFamilyFile) {
if (apiResponse.data['PatientShareRequestID'] != null && apiResponse.data['PatientShareRequestID'] == 0 && apiResponse.messageStatus == 1) { if (apiResponse.data['PatientShareRequestID'] != null && apiResponse.data['PatientShareRequestID'] == 0 && apiResponse.messageStatus == 1) {

@ -127,9 +127,9 @@ class AppointmentDoctorCard extends StatelessWidget {
runSpacing: 6.h, runSpacing: 6.h,
children: [ children: [
AppCustomChipWidget( AppCustomChipWidget(
labelText: (patientAppointmentHistoryResponseModel.clinicName!.length > 20 labelText: ((patientAppointmentHistoryResponseModel.clinicName ?? "").length > 20
? '${patientAppointmentHistoryResponseModel.clinicName!.substring(0, 20)}...' ? '${(patientAppointmentHistoryResponseModel.clinicName ?? "").substring(0, 20)}...'
: patientAppointmentHistoryResponseModel.clinicName!), : (patientAppointmentHistoryResponseModel.clinicName ?? "")),
labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w), labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w),
), ),
AppCustomChipWidget( AppCustomChipWidget(

@ -89,7 +89,7 @@ class _HabibWalletState extends State<HabibWalletPage> {
"${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}" "${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}"
.toText19(isBold: true, color: Colors.white), .toText19(isBold: true, color: Colors.white),
"${LocaleKeys.fileno.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId!}" "${LocaleKeys.fileno.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId!}"
.toText14(isBold: true, color: AppColors.greyTextColor, isEnglishOnly: true), .toText14(isBold: true, color: AppColors.greyTextColor),
], ],
).expanded, ).expanded,
Utils.buildSvgWithAssets(icon: AppAssets.habiblogo, width: 24.h, height: 24.h, applyThemeColor: false), Utils.buildSvgWithAssets(icon: AppAssets.habiblogo, width: 24.h, height: 24.h, applyThemeColor: false),

@ -17,6 +17,7 @@ import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'dart:ui' as ui;
class LakumWalletDetails extends StatelessWidget { class LakumWalletDetails extends StatelessWidget {
const LakumWalletDetails({super.key}); const LakumWalletDetails({super.key});
@ -239,10 +240,10 @@ class LakumWalletDetails extends StatelessWidget {
return CustomButton( return CustomButton(
height: 46.h, height: 46.h,
icon: AppAssets.redeem_icon, icon: AppAssets.redeem_icon,
iconColor: AppColors.whiteColor, iconColor: AppColors.textColor,
iconSize: 24.h, iconSize: 24.h,
backgroundColor: AppColors.habibPharmacyColor, backgroundColor: AppColors.habibPharmacyColor,
textColor: AppColors.whiteColor, textColor: AppColors.textColor,
text: LocaleKeys.redeem.tr(context: context), text: LocaleKeys.redeem.tr(context: context),
borderWidth: 0.w, borderWidth: 0.w,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -350,7 +351,10 @@ class LakumWalletDetails extends StatelessWidget {
maxlines: 2, maxlines: 2,
), ),
SizedBox(height: 2.h), SizedBox(height: 2.h),
formattedDate.toText12(color: AppColors.greyTextColor), Directionality(
textDirection: ui.TextDirection.ltr,
child: formattedDate.toText12(color: AppColors.greyTextColor),
),
], ],
), ),
), ),
@ -363,10 +367,10 @@ class LakumWalletDetails extends StatelessWidget {
isBold: true, isBold: true,
color: transactionColor, color: transactionColor,
), ),
if (transaction.amount != null && transaction.amount! > 0) // if (transaction.amount != null && transaction.amount! > 0)
"${transaction.amount?.toStringAsFixed(2) ?? "0.00"} SAR".toText11( // "${transaction.amount?.toStringAsFixed(2) ?? "0.00"} SAR".toText11(
color: AppColors.greyTextColor, // color: AppColors.greyTextColor,
), // ),
], ],
), ),
], ],

@ -1,11 +1,13 @@
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenshot_blocker/flutter_screenshot_blocker.dart'; import 'package:flutter_screenshot_blocker/flutter_screenshot_blocker.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_model.dart'; import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_model.dart';
import 'package:hmg_patient_app_new/features/notifications/notifications_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -21,9 +23,10 @@ class NotificationDetailsPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
getIt.get<NotificationsViewModel>().markAsRead(notificationID: notification.id ?? 0);
return ScreenshotBlockerWidget( return ScreenshotBlockerWidget(
blockScreenshots: true, // makes this widget appear black in screenshots blockScreenshots: true, // makes this widget appear black in screenshots
detectScreenshots: true, // listen for screenshot attempts detectScreenshots: true, // listen for screenshot attempts
onScreenshotDetected: (event) { onScreenshotDetected: (event) {
// event.type 'screenshot_taken' or 'screenshot_blocked' // event.type 'screenshot_taken' or 'screenshot_blocked'
// ScaffoldMessenger.of(context).showSnackBar( // ScaffoldMessenger.of(context).showSnackBar(

@ -49,187 +49,176 @@ class _NotificationsListPageState extends State<NotificationsListPage> {
return CollapsingListView( return CollapsingListView(
title: LocaleKeys.notification.tr(context: context), title: LocaleKeys.notification.tr(context: context),
child: Consumer<NotificationsViewModel>(builder: (context, notificationsVM, child) { child: Consumer<NotificationsViewModel>(builder: (context, notificationsVM, child) {
return Column( return Column(
children: [ children: [
Container( Container(
margin: EdgeInsets.symmetric(vertical: 24.h), margin: EdgeInsets.symmetric(vertical: 24.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 24.h, borderRadius: 24.h,
hasShadow: false, hasShadow: false,
), ),
child: ListView.builder( child: ListView.builder(
itemCount: notificationsVM.isNotificationsLoading itemCount: notificationsVM.isNotificationsLoading
? 4 ? 4
// : notificationsVM.notificationsList.length + (notificationsVM.hasMoreNotifications ? 1 : 0), // : notificationsVM.notificationsList.length + (notificationsVM.hasMoreNotifications ? 1 : 0),
: notificationsVM.notificationsList.length, : notificationsVM.notificationsList.length,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
padding: EdgeInsetsGeometry.zero, padding: EdgeInsetsGeometry.zero,
itemBuilder: (context, index) { itemBuilder: (context, index) {
if (notificationsVM.isNotificationsLoading) { if (notificationsVM.isNotificationsLoading) {
return LabResultItemView( return LabResultItemView(
onTap: () {}, onTap: () {},
labOrder: null, labOrder: null,
index: index, index: index,
isLoading: true, isLoading: true,
); );
} }
return AnimationConfiguration.staggeredList( return AnimationConfiguration.staggeredList(
position: index, position: index,
duration: const Duration(milliseconds: 500), duration: const Duration(milliseconds: 500),
child: SlideAnimation( child: SlideAnimation(
verticalOffset: 100.0, verticalOffset: 100.0,
child: FadeInAnimation( child: FadeInAnimation(
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
notificationsVM.markAsRead(notificationID: notificationsVM.notificationsList[index].id ?? 0); notificationsVM.markAsRead(notificationID: notificationsVM.notificationsList[index].id ?? 0);
getIt.get<TodoSectionViewModel>().getPatientDashboard(); getIt.get<TodoSectionViewModel>().getPatientDashboard();
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => NotificationDetailsPage( builder: (context) => NotificationDetailsPage(
notification: notificationsVM.notificationsList[index], notification: notificationsVM.notificationsList[index],
),
),
);
},
child: AnimatedContainer(
duration: Duration(milliseconds: 300),
curve: Curves.easeInOut,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16.h),
// Message row with red dot for unread
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: notificationsVM.notificationsList[index].message!.toText16(
isBold: (notificationsVM.notificationsList[index].isRead == false),
weight: (notificationsVM.notificationsList[index].isRead == false) ? FontWeight.w600 : FontWeight.w400,
),
),
SizedBox(width: 8.w),
// Red dot for unread notifications ONLY
if (notificationsVM.notificationsList[index].isRead == false)
Container(
width: 8.w,
height: 8.w,
decoration: BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
), ),
), ),
); ],
}, ),
child: AnimatedContainer( SizedBox(height: 12.h),
duration: Duration(milliseconds: 300), // First row: Time and Date chips with arrow
curve: Curves.easeInOut, Row(
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, // Time chip with clock icon
children: [ Container(
SizedBox(height: 16.h), padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
// Message row with red dot for unread decoration: BoxDecoration(
Row( color: AppColors.greyColor,
crossAxisAlignment: CrossAxisAlignment.start, borderRadius: BorderRadius.circular(8),
),
child: Directionality(
textDirection: ui.TextDirection.ltr,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [ children: [
Expanded( Icon(Icons.access_time, size: 12.w, color: AppColors.textColor),
child: notificationsVM.notificationsList[index].message!.toText16( SizedBox(width: 4.w),
isBold: (notificationsVM.notificationsList[index].isRead == false), _formatTime(notificationsVM.notificationsList[index].isSentOn).toText10(weight: FontWeight.w600, color: AppColors.textColor, isEnglishOnly: true),
weight: (notificationsVM.notificationsList[index].isRead == false)
? FontWeight.w600
: FontWeight.w400,
),
),
SizedBox(width: 8.w),
// Red dot for unread notifications ONLY
if (notificationsVM.notificationsList[index].isRead == false)
Container(
width: 8.w,
height: 8.w,
decoration: BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
),
], ],
), ),
SizedBox(height: 12.h), ),
// First row: Time and Date chips with arrow ),
Row( SizedBox(width: 8.w),
// Date chip with calendar icon
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
decoration: BoxDecoration(
color: AppColors.greyColor,
borderRadius: BorderRadius.circular(8),
),
child: Directionality(
textDirection: ui.TextDirection.ltr,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [ children: [
// Time chip with clock icon Icon(Icons.calendar_today, size: 12.w, color: AppColors.textColor),
Container( SizedBox(width: 4.w),
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), _formatDate(notificationsVM.notificationsList[index].isSentOn).toText10(weight: FontWeight.w600, color: AppColors.textColor, isEnglishOnly: true),
decoration: BoxDecoration(
color: AppColors.greyColor,
borderRadius: BorderRadius.circular(8),
),
child: Directionality(
textDirection: ui.TextDirection.ltr,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.access_time, size: 12.w, color: AppColors.textColor),
SizedBox(width: 4.w),
_formatTime(notificationsVM.notificationsList[index].isSentOn).toText10(
weight: FontWeight.w600,
color: AppColors.textColor,
isEnglishOnly: true
),
],
),
),
),
SizedBox(width: 8.w),
// Date chip with calendar icon
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
decoration: BoxDecoration(
color: AppColors.greyColor,
borderRadius: BorderRadius.circular(8),
),
child: Directionality(
textDirection: ui.TextDirection.ltr,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.calendar_today, size: 12.w, color: AppColors.textColor),
SizedBox(width: 4.w),
_formatDate(notificationsVM.notificationsList[index].isSentOn).toText10(
weight: FontWeight.w600,
color: AppColors.textColor,
isEnglishOnly: true
),
],
),
),
),
Spacer(),
// Arrow icon
Transform.flip(
flipX: getIt.get<AppState>().isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.arrow_forward,
width: 16.w,
height: 16.h,
iconColor: AppColors.greyTextColor,
),
),
], ],
), ),
// Second row: Contains Image chip (if MessageType is "image") ),
if (notificationsVM.notificationsList[index].messageType != null && ),
notificationsVM.notificationsList[index].messageType!.toLowerCase() == "image") Spacer(),
Padding( // Arrow icon
padding: EdgeInsets.only(top: 8.h), Transform.flip(
child: Row( flipX: getIt.get<AppState>().isArabic(),
children: [ child: Utils.buildSvgWithAssets(
Container( icon: AppAssets.arrow_forward,
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h), width: 16.w,
decoration: BoxDecoration( height: 16.h,
color: AppColors.greyColor, iconColor: AppColors.greyTextColor,
borderRadius: BorderRadius.circular(8), ),
), ),
child: Row( ],
mainAxisSize: MainAxisSize.min, ),
children: [ // Second row: Contains Image chip (if MessageType is "image")
Icon(Icons.image_outlined, size: 12.w, color: AppColors.textColor), if (notificationsVM.notificationsList[index].messageType != null && notificationsVM.notificationsList[index].messageType!.toLowerCase() == "image")
SizedBox(width: 4.w), Padding(
LocaleKeys.containsImage.toText10( padding: EdgeInsets.only(top: 8.h),
weight: FontWeight.w600, child: Row(
color: AppColors.textColor, children: [
), Container(
], padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
), decoration: BoxDecoration(
), color: AppColors.greyColor,
], borderRadius: BorderRadius.circular(8),
), ),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.image_outlined, size: 12.w, color: AppColors.textColor),
SizedBox(width: 4.w),
LocaleKeys.containsImage.toText10(
weight: FontWeight.w600,
color: AppColors.textColor,
),
],
), ),
SizedBox(height: 16.h), ),
1.divider,
], ],
), ),
), ),
), SizedBox(height: 16.h),
), 1.divider,
],
), ),
); ),
}).paddingSymmetrical(16.w, 0.h), ),
).paddingSymmetrical(24.w, 0.h), ),
SizedBox(height: 16.h), ),
);
}).paddingSymmetrical(16.w, 0.h),
).paddingSymmetrical(24.w, 0.h),
SizedBox(height: 16.h),
// SizedBox( // SizedBox(
// key: _bottomKey, // key: _bottomKey,
// child: "Show more notifications".toText16( // child: "Show more notifications".toText16(
@ -242,9 +231,9 @@ class _NotificationsListPageState extends State<NotificationsListPage> {
// _scrollToBottom(); // _scrollToBottom();
// }), // }),
SizedBox(height: 24.h), SizedBox(height: 24.h),
], ],
); );
}), }),
); );
} }

@ -273,9 +273,9 @@ void showCommonBottomSheetWithoutHeight(
if (navContext != null && Navigator.canPop(navContext)) { if (navContext != null && Navigator.canPop(navContext)) {
Navigator.of(navContext).pop(); Navigator.of(navContext).pop();
} }
if (callBackFunc != null) { // if (callBackFunc != null) {
callBackFunc(); // callBackFunc();
} // }
}); });
} }
return SafeArea( return SafeArea(

Loading…
Cancel
Save