pull/199/head
haroon amjad 2 days ago
parent d053f58b7d
commit 0ed6103b15

@ -165,11 +165,11 @@ extension SmoothContainerExtension on ShapeBorder {
shadows: hasShadow shadows: hasShadow
? [ ? [
BoxShadow( BoxShadow(
color: hasDenseShadow ? const Color(0xff000000).withOpacity(.30) : const Color(0xff000000).withOpacity(.1), // color: hasDenseShadow ? const Color(0xff000000).withOpacity(.06) : const Color(0xff000000).withOpacity(.1),
// color: AppColors.primaryRedColor.withOpacity(.5), color: const Color(0xffE1E1E1).withOpacity(1.0),
blurRadius: 10, blurRadius: 0,
spreadRadius: 0, spreadRadius: 0,
offset: const Offset(0, 0), offset: const Offset(1, 0),
) )
] ]
: [], : [],

@ -17,6 +17,7 @@ import 'package:hmg_patient_app_new/presentation/contact_us/live_chat_page.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/routes/custom_page_route.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class ContactUs extends StatelessWidget { class ContactUs extends StatelessWidget {
ContactUs({super.key}); ContactUs({super.key});
@ -33,6 +34,15 @@ class ContactUs extends StatelessWidget {
contactUsViewModel = Provider.of<ContactUsViewModel>(context); contactUsViewModel = Provider.of<ContactUsViewModel>(context);
return Column( return Column(
children: [ children: [
checkInOptionCard(
AppAssets.call_fill,
LocaleKeys.callNow.tr(),
// LocaleKeys.viewNearestHMGLocationsviewNearestHMGLocations.tr(),
"Call for immediate assistance",
).onPress(() {
launchUrl(Uri.parse("tel://" + "+966 92 006 6666"));
}),
SizedBox(height: 16.h),
checkInOptionCard( checkInOptionCard(
AppAssets.location, AppAssets.location,
LocaleKeys.findUs.tr(), LocaleKeys.findUs.tr(),
@ -46,24 +56,21 @@ class ContactUs extends StatelessWidget {
page: FindUsPage(), page: FindUsPage(),
), ),
); );
}); }, onFailure: () {
}), Navigator.pop(context);
SizedBox(height: 16.h), Navigator.of(context).push(
checkInOptionCard( CustomPageRoute(
AppAssets.feedbackFill, page: FindUsPage(),
LocaleKeys.feedback.tr(), ),
LocaleKeys.provideFeedbackOnServices.tr(),
).onPress(() {
contactUsViewModel.setSelectedFeedbackType(
FeedbackType(id: 5, nameEN: "Not classified", nameAR: 'غير محدد'),
); );
contactUsViewModel.setIsSendFeedbackTabSelected(true); }, onLocationDeniedForever: () {
Navigator.pop(context); Navigator.pop(context);
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: FeedbackPage(), page: FindUsPage(),
), ),
); );
});
}), }),
SizedBox(height: 16.h), SizedBox(height: 16.h),
checkInOptionCard( checkInOptionCard(

@ -25,6 +25,8 @@ import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_mode
import 'package:hmg_patient_app_new/features/hospital/hospital_selection_view_model.dart'; import 'package:hmg_patient_app_new/features/hospital/hospital_selection_view_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart';
import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart'; import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart';
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
import 'package:hmg_patient_app_new/features/medical_file/models/family_file_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
@ -45,7 +47,9 @@ import 'package:hmg_patient_app_new/presentation/home/widgets/habib_wallet_card.
import 'package:hmg_patient_app_new/presentation/home/widgets/large_service_card.dart'; import 'package:hmg_patient_app_new/presentation/home/widgets/large_service_card.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/small_service_card.dart'; import 'package:hmg_patient_app_new/presentation/home/widgets/small_service_card.dart';
import 'package:hmg_patient_app_new/presentation/home/widgets/welcome_widget.dart'; import 'package:hmg_patient_app_new/presentation/home/widgets/welcome_widget.dart';
import 'package:hmg_patient_app_new/presentation/insurance/insurance_home_page.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart';
import 'package:hmg_patient_app_new/presentation/my_family/my_family.dart';
import 'package:hmg_patient_app_new/presentation/notifications/notifications_list_page.dart'; import 'package:hmg_patient_app_new/presentation/notifications/notifications_list_page.dart';
import 'package:hmg_patient_app_new/presentation/profile_settings/profile_settings.dart'; import 'package:hmg_patient_app_new/presentation/profile_settings/profile_settings.dart';
import 'package:hmg_patient_app_new/presentation/rate_appointment/rate_appointment_doctor.dart'; import 'package:hmg_patient_app_new/presentation/rate_appointment/rate_appointment_doctor.dart';
@ -53,6 +57,7 @@ import 'package:hmg_patient_app_new/presentation/todo_section/ancillary_procedur
import 'package:hmg_patient_app_new/presentation/todo_section/widgets/ancillary_orders_list.dart'; import 'package:hmg_patient_app_new/presentation/todo_section/widgets/ancillary_orders_list.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart'; import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart'; import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/services/zoom_service.dart'; import 'package:hmg_patient_app_new/services/zoom_service.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/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -62,6 +67,7 @@ import 'package:hmg_patient_app_new/widgets/countdown_timer.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:hmg_patient_app_new/widgets/routes/spring_page_route_builder.dart'; import 'package:hmg_patient_app_new/widgets/routes/spring_page_route_builder.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:smooth_corner/smooth_corner.dart';
import '../emergency_services/call_ambulance/widgets/HospitalBottomSheetBody.dart'; import '../emergency_services/call_ambulance/widgets/HospitalBottomSheetBody.dart';
@ -122,6 +128,7 @@ class _LandingPageState extends State<LandingPage> {
emergencyServicesViewModel.checkPatientERAdvanceBalance(); emergencyServicesViewModel.checkPatientERAdvanceBalance();
// myAppointmentsViewModel.getPatientAppointmentQueueDetails(); // myAppointmentsViewModel.getPatientAppointmentQueueDetails();
notificationsViewModel.initNotificationsViewModel(); notificationsViewModel.initNotificationsViewModel();
insuranceViewModel.initInsuranceProvider();
// Commented as per new requirement to remove rating popup from the app // Commented as per new requirement to remove rating popup from the app
@ -160,8 +167,11 @@ class _LandingPageState extends State<LandingPage> {
canPop: false, canPop: false,
child: Scaffold( child: Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: SingleChildScrollView( body: Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
padding: EdgeInsets.only(top: kToolbarHeight + 0.h, bottom: 24), return Stack(
children: [
SingleChildScrollView(
padding: EdgeInsets.only(top: (!insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired) ? (MediaQuery.paddingOf(context).top + 70.h) : kToolbarHeight + 0.h, bottom: 24),
child: Column( child: Column(
spacing: 16.h, spacing: 16.h,
children: [ children: [
@ -172,7 +182,21 @@ class _LandingPageState extends State<LandingPage> {
appState.isAuthenticated appState.isAuthenticated
? WelcomeWidget( ? WelcomeWidget(
onTap: () { onTap: () {
Navigator.of(context).push(springPageRoute(ProfileSettings())); // DialogService dialogService = getIt.get<DialogService>();
// dialogService.showFamilyBottomSheetWithoutH(
// label: LocaleKeys.familyTitle.tr(context: context),
// message: "",
// isShowManageButton: true,
// onSwitchPress: (FamilyFileResponseModelLists profile) {
// getIt.get<MedicalFileViewModel>().switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber);
// },
// profiles: getIt.get<MedicalFileViewModel>().patientFamilyFiles);
Navigator.of(context).push(
CustomPageRoute(
page: FamilyMedicalScreen(),
),
);
}, },
name: ('${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}'), name: ('${appState.getAuthenticatedUser()!.firstName!} ${appState.getAuthenticatedUser()!.lastName!}'),
imageUrl: appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.maleImg : AppAssets.femaleImg, imageUrl: appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.maleImg : AppAssets.femaleImg,
@ -245,10 +269,8 @@ class _LandingPageState extends State<LandingPage> {
) )
: SizedBox.shrink(), : SizedBox.shrink(),
]), ]),
Utils.buildSvgWithAssets(icon: AppAssets.indoor_nav_icon, height: 24.h, width: 24.w).onPress(() { Utils.buildSvgWithAssets(icon: AppAssets.location, height: 24.h, width: 24.w).onPress(() {
openIndoorNavigationBottomSheet(context); // openIndoorNavigationBottomSheet(context);
}),
Utils.buildSvgWithAssets(icon: AppAssets.contact_icon, height: 24.h, width: 24.h).onPress(() {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
title: LocaleKeys.contactUs.tr(), title: LocaleKeys.contactUs.tr(),
@ -257,6 +279,15 @@ class _LandingPageState extends State<LandingPage> {
isFullScreen: false, isFullScreen: false,
); );
}), }),
// Utils.buildSvgWithAssets(icon: AppAssets.contact_icon, height: 24.h, width: 24.h).onPress(() {
// showCommonBottomSheetWithoutHeight(
// context,
// title: LocaleKeys.contactUs.tr(),
// child: ContactUs(),
// callBackFunc: () {},
// isFullScreen: false,
// );
// }),
!appState.isAuthenticated !appState.isAuthenticated
? Utils.buildSvgWithAssets(icon: appState.isArabic() ? AppAssets.enLangIcon : AppAssets.arLangIcon, height: 24.h, width: 24.h).onPress(() { ? Utils.buildSvgWithAssets(icon: appState.isArabic() ? AppAssets.enLangIcon : AppAssets.arLangIcon, height: 24.h, width: 24.h).onPress(() {
context.setLocale(appState.isArabic() ? Locale('en', 'US') : Locale('ar', 'SA')); context.setLocale(appState.isArabic() ? Locale('en', 'US') : Locale('ar', 'SA'));
@ -481,17 +512,17 @@ class _LandingPageState extends State<LandingPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
AppCustomChipWidget( // AppCustomChipWidget(
labelText: LocaleKeys.erOnlineCheckInRequest.tr(context: context), // labelText: LocaleKeys.erOnlineCheckInRequest.tr(context: context),
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.10), // backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.10),
textColor: AppColors.primaryRedColor, // textColor: AppColors.primaryRedColor,
), // ),
Utils.buildSvgWithAssets(icon: AppAssets.appointment_checkin_icon, width: 24.h, height: 24.h, iconColor: AppColors.primaryRedColor), // Utils.buildSvgWithAssets(icon: AppAssets.appointment_checkin_icon, width: 24.h, height: 24.h, iconColor: AppColors.primaryRedColor),
], // ],
), // ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -555,7 +586,11 @@ class _LandingPageState extends State<LandingPage> {
trackColor: Color(0xffD9D9D9), trackColor: Color(0xffD9D9D9),
trackBorderColor: Colors.transparent, trackBorderColor: Colors.transparent,
trackRadius: Radius.circular(10.0), trackRadius: Radius.circular(10.0),
padding: EdgeInsets.only(top: 92.h + 32.h, left: MediaQuery.sizeOf(context).width / 2 - 35, right: MediaQuery.sizeOf(context).width / 2 - 35), padding: EdgeInsets.only(top: 92.h + 32.h, left: MediaQuery
.sizeOf(context)
.width / 2 - 35, right: MediaQuery
.sizeOf(context)
.width / 2 - 35),
child: ListView.separated( child: ListView.separated(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemCount: LandingPageData.getLoggedInServiceCardsList.length, itemCount: LandingPageData.getLoggedInServiceCardsList.length,
@ -693,6 +728,58 @@ class _LandingPageState extends State<LandingPage> {
], ],
), ),
), ),
(!insuranceVM.isInsuranceLoading && insuranceVM.isInsuranceExpired)
? Container(
height: MediaQuery.paddingOf(context).top + 50.h,
decoration: ShapeDecoration(
color: AppColors.secondaryLightRedBorderColor,
shape: SmoothRectangleBorder(
side: BorderSide(width: 1, color: AppColors.primaryRedColor.withAlpha(20)),
// borderRadius: BorderRadius.only(bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24)),
smoothness: 1,
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
Row(
children: [
CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context),
onPressed: () {
Navigator.of(context).push(
CustomPageRoute(
page: InsuranceHomePage(),
),
);
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.secondaryLightRedBorderColor,
textColor: AppColors.whiteColor,
fontSize: 10.f,
fontWeight: FontWeight.bold,
borderRadius: 8.r,
padding: EdgeInsets.fromLTRB(15, 0, 15, 0),
height: 36.h,
).paddingSymmetrical(24.h, 0.h),
],
),
],
),
SizedBox(
height: 10.h,
)
],
),
)
: SizedBox.shrink()
],
);
}),
), ),
); );
} }

@ -1,10 +1,20 @@
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:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/dependencies.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/core/utils/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/insurance/insurance_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/presentation/insurance/insurance_home_page.dart';
import 'package:hmg_patient_app_new/presentation/profile_settings/profile_settings.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/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:hmg_patient_app_new/widgets/routes/spring_page_route_builder.dart';
import 'package:smooth_corner/smooth_corner.dart';
class WelcomeWidget extends StatelessWidget { class WelcomeWidget extends StatelessWidget {
final String name; final String name;
@ -20,13 +30,18 @@ class WelcomeWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return InkWell( return Column(
children: [
InkWell(
onTap: onTap, onTap: onTap,
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
spacing: 8.h, spacing: 8.h,
children: [ children: [
Icon(Icons.menu, color: AppColors.textColor).onPress(() {
Navigator.of(context).push(springPageRoute(ProfileSettings()));
}),
Image.asset(imageUrl, width: 40, height: 40), Image.asset(imageUrl, width: 40, height: 40),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -40,13 +55,16 @@ class WelcomeWidget extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Flexible(child: name.toText16(weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1, height: 1, isEnglishOnly: true)), Flexible(child: name.toText16(weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1, height: 1, isEnglishOnly: true)),
Icon(Icons.keyboard_arrow_down, size: 20, color: AppColors.greyTextColor), // Icon(Icons.keyboard_arrow_down, size: 20, color: AppColors.greyTextColor),
Utils.buildSvgWithAssets(icon: AppAssets.arrowRight, height: 22.h, width: 22.w)
], ],
), ),
], ],
).expanded, ).expanded,
], ],
), ),
),
],
); );
} }
} }

@ -199,18 +199,23 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
], ],
), ),
SizedBox(width: 4.h), SizedBox(width: 4.h),
Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, height: 22.h, width: 22.w) Utils.buildSvgWithAssets(icon: AppAssets.arrowRight, height: 22.h, width: 22.w)
], ],
).onPress(() { ).onPress(() {
DialogService dialogService = getIt.get<DialogService>(); Navigator.of(context).push(
dialogService.showFamilyBottomSheetWithoutH( CustomPageRoute(
label: LocaleKeys.familyTitle.tr(context: context), page: FamilyMedicalScreen(),
message: "", ),
isShowManageButton: true, );
onSwitchPress: (FamilyFileResponseModelLists profile) { // DialogService dialogService = getIt.get<DialogService>();
medicalFileViewModel.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber); // dialogService.showFamilyBottomSheetWithoutH(
}, // label: LocaleKeys.familyTitle.tr(context: context),
profiles: medicalFileViewModel.patientFamilyFiles); // message: "",
// isShowManageButton: true,
// onSwitchPress: (FamilyFileResponseModelLists profile) {
// medicalFileViewModel.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber);
// },
// profiles: medicalFileViewModel.patientFamilyFiles);
}), }),
isLeading: widget.showBackIcon, isLeading: widget.showBackIcon,
// leadingCallback: () { // leadingCallback: () {

@ -1,3 +1,5 @@
import 'dart:async';
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:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -9,16 +11,22 @@ import 'package:hmg_patient_app_new/core/utils/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/habib_wallet/habib_wallet_view_model.dart'; import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart';
import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart';
import 'package:hmg_patient_app_new/features/medical_file/models/family_file_response_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/models/family_file_response_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/presentation/insurance/widgets/insurance_update_details_card.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart'; import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart'; import 'package:hmg_patient_app_new/services/navigation_service.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/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:hmg_patient_app_new/widgets/chip/custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/custom_chip_widget.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:provider/provider.dart';
class FamilyCards extends StatefulWidget { class FamilyCards extends StatefulWidget {
final List<FamilyFileResponseModelLists> profiles; final List<FamilyFileResponseModelLists> profiles;
late List<FamilyFileResponseModelLists>? profileViewList;
final Function(FamilyFileResponseModelLists) onSelect; final Function(FamilyFileResponseModelLists) onSelect;
final Function(FamilyFileResponseModelLists) onRemove; final Function(FamilyFileResponseModelLists) onRemove;
final bool isShowDetails; final bool isShowDetails;
@ -28,11 +36,12 @@ class FamilyCards extends StatefulWidget {
final bool isShowRemoveButton; final bool isShowRemoveButton;
final bool isForWalletRecharge; final bool isForWalletRecharge;
const FamilyCards( FamilyCards(
{super.key, {super.key,
required this.profiles, required this.profiles,
required this.onSelect, required this.onSelect,
required this.onRemove, required this.onRemove,
this.profileViewList,
this.isShowDetails = false, this.isShowDetails = false,
this.isBottomSheet = false, this.isBottomSheet = false,
this.isRequestDesign = false, this.isRequestDesign = false,
@ -46,9 +55,22 @@ class FamilyCards extends StatefulWidget {
class _FamilyCardsState extends State<FamilyCards> { class _FamilyCardsState extends State<FamilyCards> {
AppState appState = getIt<AppState>(); AppState appState = getIt<AppState>();
late InsuranceViewModel insuranceViewModel;
@override
void initState() {
scheduleMicrotask(() {
insuranceViewModel.initInsuranceProvider();
});
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
widget.profileViewList = [];
widget.profileViewList!.addAll(widget.profiles);
widget.profileViewList!.removeWhere((element) => element.responseId == appState.getAuthenticatedUser()?.patientId);
insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false);
DialogService dialogService = getIt.get<DialogService>(); DialogService dialogService = getIt.get<DialogService>();
if (widget.isRequestDesign) { if (widget.isRequestDesign) {
return Column( return Column(
@ -71,15 +93,15 @@ class _FamilyCardsState extends State<FamilyCards> {
], ],
), ),
SizedBox(height: 24.h), SizedBox(height: 24.h),
widget.profiles.where((profile) => profile.isRequestFromMySide ?? false).isEmpty widget.profileViewList!.where((profile) => profile.isRequestFromMySide ?? false).isEmpty
? Utils.getNoDataWidget(context) ? Utils.getNoDataWidget(context)
: ListView.builder( : ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemCount: widget.profiles.where((profile) => profile.isRequestFromMySide ?? false).length, itemCount: widget.profileViewList!.where((profile) => profile.isRequestFromMySide ?? false).length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
final mySideProfiles = widget.profiles.where((profile) => profile.isRequestFromMySide ?? false).toList(); final mySideProfiles = widget.profileViewList!.where((profile) => profile.isRequestFromMySide ?? false).toList();
FamilyFileResponseModelLists profile = mySideProfiles[index]; FamilyFileResponseModelLists profile = mySideProfiles[index];
return Container( return Container(
margin: EdgeInsets.only(bottom: 12.h), margin: EdgeInsets.only(bottom: 12.h),
@ -146,10 +168,145 @@ class _FamilyCardsState extends State<FamilyCards> {
], ],
); );
} else { } else {
return GridView.builder( return Column(
children: [
Container(
width: double.infinity,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 12.r),
child: Padding(
padding: EdgeInsets.all(16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(appState.getAuthenticatedUser()?.gender == 1 ? AppAssets.maleImg : AppAssets.femaleImg, width: 56.w, height: 56.h),
SizedBox(width: 8.w),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: MediaQuery.of(context).size.width * 0.6,
child: "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}"
.toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 2),
),
SizedBox(height: 4.h),
Wrap(
direction: Axis.horizontal,
spacing: 4.w,
runSpacing: 6.w,
children: [
AppCustomChipWidget(
icon: AppAssets.file_icon,
richText: "${LocaleKeys.fileno.tr(context: context)}: ${appState.getAuthenticatedUser()!.patientId}".toText10(isEnglishOnly: true),
labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
),
AppCustomChipWidget(
icon: AppAssets.checkmark_icon,
labelText: LocaleKeys.verified.tr(context: context),
iconColor: AppColors.successColor,
labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: 6.w),
),
],
),
],
)
],
),
SizedBox(height: 16.h),
Divider(color: AppColors.dividerColor, height: 1.h),
SizedBox(height: 16.h),
Wrap(
direction: Axis.horizontal,
spacing: 4.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(
labelText: LocaleKeys.ageYearsOld.tr(namedArgs: {'age': '${appState.getAuthenticatedUser()!.age}', 'yearsOld': LocaleKeys.yearsOld.tr(context: context)}, context: context),
labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w),
),
AppCustomChipWidget(
icon: AppAssets.blood_icon,
labelText: appState.getUserBloodGroup.isEmpty ? "N/A" : appState.getUserBloodGroup,
iconColor: AppColors.primaryRedColor,
labelPadding: EdgeInsetsDirectional.only(start: -6.w, end: 6.w),
padding: EdgeInsets.zero,
),
Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
return AppCustomChipWidget(
icon: insuranceVM.isInsuranceExpired
? AppAssets.cancel_circle_icon
: insuranceVM.isInsuranceActive
? AppAssets.insurance_active_icon
: AppAssets.alertSquare,
labelText: insuranceVM.isInsuranceExpired
? LocaleKeys.insuranceExpired.tr(context: context)
: insuranceVM.isInsuranceActive
? LocaleKeys.insuranceActive.tr(context: context)
: LocaleKeys.insuranceInActive.tr(context: context),
iconColor: insuranceVM.isInsuranceExpired
? AppColors.primaryRedColor
: insuranceVM.isInsuranceActive
? AppColors.successColor
: AppColors.warningColorYellow,
textColor: insuranceVM.isInsuranceExpired
? AppColors.primaryRedColor
: insuranceVM.isInsuranceActive
? AppColors.successColor
: AppColors.warningColorYellow,
iconSize: 12.w,
deleteIcon: insuranceVM.isInsuranceActive ? null : AppAssets.forward_chevron_icon,
deleteIconColor: insuranceVM.isInsuranceExpired
? AppColors.primaryRedColor
: insuranceVM.isInsuranceActive
? AppColors.successColor
: AppColors.warningColorYellow,
deleteIconHasColor: true,
onChipTap: () {
if (!insuranceVM.isInsuranceActive) {
insuranceVM.setIsInsuranceUpdateDetailsLoading(true);
insuranceVM.getPatientInsuranceDetailsForUpdate(
appState.getAuthenticatedUser()!.patientId.toString(), appState.getAuthenticatedUser()!.patientIdentificationNo.toString());
showCommonBottomSheetWithoutHeight(context, child: PatientInsuranceCardUpdateCard(), callBackFunc: () {}, title: "", isCloseButtonVisible: false, isFullScreen: false);
// showCommonBottomSheetWithoutHeight(
// title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
// navigationService.navigatorKey.currentContext!,
// child: Utils.getWarningWidget(
// loadingText: LocaleKeys.insuranceInActiveContactSupport.tr(context: context),
// confirmText: LocaleKeys.contactUs.tr(context: context),
// isShowActionButtons: true,
// onCancelTap: () {
// navigationService.pop();
// },
// onConfirmTap: () async {
// launchUrl(Uri.parse("tel://" + "+966 92 006 6666"));
// }),
// callBackFunc: () {},
// isFullScreen: false,
// isCloseButtonVisible: true,
// );
}
},
backgroundColor: insuranceVM.isInsuranceExpired
? AppColors.primaryRedColor.withOpacity(0.1)
: insuranceVM.isInsuranceActive
? AppColors.successColor.withOpacity(0.1)
: AppColors.warningColorYellow.withOpacity(0.1),
labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: insuranceVM.isInsuranceActive ? 6.w : 0.w),
).toShimmer2(isShow: insuranceVM.isInsuranceLoading);
}),
],
),
],
),
),
).paddingSymmetrical(0.w, 0.0),
SizedBox(height: 16.h),
GridView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
itemCount: widget.profiles.length, itemCount: widget.profileViewList!.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, crossAxisCount: 2,
crossAxisSpacing: 10.w, crossAxisSpacing: 10.w,
@ -158,7 +315,7 @@ class _FamilyCardsState extends State<FamilyCards> {
), ),
padding: EdgeInsets.only(bottom: 20.h), padding: EdgeInsets.only(bottom: 20.h),
itemBuilder: (context, index) { itemBuilder: (context, index) {
final profile = widget.profiles[index]; final profile = widget.profileViewList![index];
final isActive = (profile.responseId == appState.getAuthenticatedUser()?.patientId); final isActive = (profile.responseId == appState.getAuthenticatedUser()?.patientId);
final isParentUser = appState.getAuthenticatedUser()?.isParentUser ?? false; final isParentUser = appState.getAuthenticatedUser()?.isParentUser ?? false;
final canSwitch = isParentUser || (!isParentUser && profile.responseId == appState.getSuperUserID); final canSwitch = isParentUser || (!isParentUser && profile.responseId == appState.getSuperUserID);
@ -197,7 +354,7 @@ class _FamilyCardsState extends State<FamilyCards> {
? CustomChipWidget( ? CustomChipWidget(
chipType: ChipTypeEnum.alert, chipType: ChipTypeEnum.alert,
backgroundColor: AppColors.lightGrayBGColor, backgroundColor: AppColors.lightGrayBGColor,
chipText: "Age:${profile.age ?? "N/A"} Years", chipText: "Age: ${profile.age ?? "N/A"} Years",
isShowBorder: false, isShowBorder: false,
borderRadius: 8.h, borderRadius: 8.h,
textColor: AppColors.textColor, textColor: AppColors.textColor,
@ -209,7 +366,8 @@ class _FamilyCardsState extends State<FamilyCards> {
height: 4.h, height: 4.h,
), ),
Spacer(), Spacer(),
widget.isForWalletRecharge ? CustomButton( widget.isForWalletRecharge
? CustomButton(
height: 40.h, height: 40.h,
onPressed: () { onPressed: () {
widget.onSelect(profile); widget.onSelect(profile);
@ -223,7 +381,8 @@ class _FamilyCardsState extends State<FamilyCards> {
icon: AppAssets.activeCheck, icon: AppAssets.activeCheck,
iconColor: isActive || !canSwitch ? (isActive ? null : AppColors.greyTextColor) : AppColors.primaryRedColor, iconColor: isActive || !canSwitch ? (isActive ? null : AppColors.greyTextColor) : AppColors.primaryRedColor,
padding: EdgeInsets.symmetric(vertical: 0, horizontal: 0), padding: EdgeInsets.symmetric(vertical: 0, horizontal: 0),
).paddingOnly(top: 0, bottom: 0) : CustomButton( ).paddingOnly(top: 0, bottom: 0)
: CustomButton(
height: 40.h, height: 40.h,
onPressed: () { onPressed: () {
if (canSwitch) widget.onSelect(profile); if (canSwitch) widget.onSelect(profile);
@ -253,6 +412,8 @@ class _FamilyCardsState extends State<FamilyCards> {
), ),
); );
}, },
),
],
); );
} }
} }
@ -260,15 +421,15 @@ class _FamilyCardsState extends State<FamilyCards> {
Widget manageFamily() { Widget manageFamily() {
NavigationService navigationService = getIt<NavigationService>(); NavigationService navigationService = getIt<NavigationService>();
return widget.profiles.where((profile) => !(profile.isRequestFromMySide ?? false)).isEmpty return widget.profileViewList!.where((profile) => !(profile.isRequestFromMySide ?? false)).isEmpty
? Utils.getNoDataWidget(context) ? Utils.getNoDataWidget(context)
: ListView.builder( : ListView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
padding: EdgeInsetsGeometry.zero, padding: EdgeInsetsGeometry.zero,
itemCount: widget.profiles.where((profile) => !(profile.isRequestFromMySide ?? false)).length, itemCount: widget.profileViewList!.where((profile) => !(profile.isRequestFromMySide ?? false)).length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
final otherProfiles = widget.profiles.where((profile) => !(profile.isRequestFromMySide ?? false)).toList(); final otherProfiles = widget.profileViewList!.where((profile) => !(profile.isRequestFromMySide ?? false)).toList();
FamilyFileResponseModelLists profile = otherProfiles[index]; FamilyFileResponseModelLists profile = otherProfiles[index];
return Container( return Container(
margin: EdgeInsets.only(bottom: 12.h), margin: EdgeInsets.only(bottom: 12.h),

@ -15,12 +15,15 @@ import 'package:hmg_patient_app_new/extensions/int_extensions.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/authentication/authentication_view_model.dart'; import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart';
import 'package:hmg_patient_app_new/features/contact_us/models/feedback_type.dart';
import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart'; import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart';
import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart'; import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart';
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
import 'package:hmg_patient_app_new/features/medical_file/models/family_file_response_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/models/family_file_response_model.dart';
import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_view_model.dart'; import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_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/presentation/contact_us/feedback_page.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart'; import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/recharge_wallet_page.dart'; import 'package:hmg_patient_app_new/presentation/habib_wallet/recharge_wallet_page.dart';
import 'package:hmg_patient_app_new/presentation/insurance/widgets/insurance_update_details_card.dart'; import 'package:hmg_patient_app_new/presentation/insurance/widgets/insurance_update_details_card.dart';
@ -88,10 +91,12 @@ class ProfileSettingsState extends State<ProfileSettings> {
int length = 3; int length = 3;
final SwiperController _controller = SwiperController(); final SwiperController _controller = SwiperController();
late InsuranceViewModel insuranceViewModel; late InsuranceViewModel insuranceViewModel;
late ContactUsViewModel contactUsViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false); insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false);
contactUsViewModel = Provider.of<ContactUsViewModel>(context, listen: false);
return CollapsingListView( return CollapsingListView(
title: LocaleKeys.profileAndSettings.tr(context: context), title: LocaleKeys.profileAndSettings.tr(context: context),
logout: () { logout: () {
@ -106,102 +111,102 @@ class ProfileSettingsState extends State<ProfileSettings> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( // SizedBox(
height: dynamicItemHeight(context) + 20 + 30, // itemHeight + shadow padding (10 top + 10 bottom) + pagination dots space // height: dynamicItemHeight(context) + 20 + 30, // itemHeight + shadow padding (10 top + 10 bottom) + pagination dots space
child: Swiper( // child: Swiper(
itemCount: medicalVm.patientFamilyFiles.length, // itemCount: medicalVm.patientFamilyFiles.length,
layout: SwiperLayout.STACK, // layout: SwiperLayout.STACK,
loop: true, // loop: true,
itemHeight: dynamicItemHeight(context) + 20, // itemHeight: dynamicItemHeight(context) + 20,
// extra space for shadow // // extra space for shadow
itemWidth: SizeUtils.width - 30.w, // itemWidth: SizeUtils.width - 30.w,
indicatorLayout: PageIndicatorLayout.COLOR, // indicatorLayout: PageIndicatorLayout.COLOR,
axisDirection: getIt.get<AppState>().isArabic() ? AxisDirection.left : AxisDirection.right, // axisDirection: getIt.get<AppState>().isArabic() ? AxisDirection.left : AxisDirection.right,
controller: _controller, // controller: _controller,
pagination: SwiperPagination( // pagination: SwiperPagination(
alignment: Alignment.bottomCenter, // alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(top: (180.h + 20 + 8.h + 24.h)), // margin: EdgeInsets.only(top: (180.h + 20 + 8.h + 24.h)),
builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: AppColors.blackBgColor), // builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: AppColors.blackBgColor),
), // ),
itemBuilder: (BuildContext context, int index) { // itemBuilder: (BuildContext context, int index) {
return Padding( // return Padding(
padding: const EdgeInsets.symmetric(vertical: 10), // padding: const EdgeInsets.symmetric(vertical: 10),
child: FamilyCardWidget( // child: FamilyCardWidget(
profile: medicalVm.patientFamilyFiles[index], // profile: medicalVm.patientFamilyFiles[index],
onAddFamilyMemberPress: () { // onAddFamilyMemberPress: () {
DialogService dialogService = getIt.get<DialogService>(); // DialogService dialogService = getIt.get<DialogService>();
dialogService.showAddFamilyFileSheet( // dialogService.showAddFamilyFileSheet(
label: LocaleKeys.addFamilyMember.tr(context: context), // label: LocaleKeys.addFamilyMember.tr(context: context),
message: LocaleKeys.pleaseFillBelowFieldToAddNewFamilyMember.tr(context: context), // message: LocaleKeys.pleaseFillBelowFieldToAddNewFamilyMember.tr(context: context),
onVerificationPress: () { // onVerificationPress: () {
medicalVm.addFamilyFile(otpTypeEnum: OTPTypeEnum.sms); // medicalVm.addFamilyFile(otpTypeEnum: OTPTypeEnum.sms);
}); // });
}, // },
onFamilySwitchPress: (FamilyFileResponseModelLists profile) { // onFamilySwitchPress: (FamilyFileResponseModelLists profile) {
medicalVm.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber); // medicalVm.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber);
}, // },
).paddingOnly(right: 16.w, left: 8.w), // ).paddingOnly(right: 16.w, left: 8.w),
); // );
}, // },
), // ),
), // ),
SizedBox(height: 16.h), // SizedBox(height: 16.h),
GridView( // GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: isTablet ? 3 : 2), // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: isTablet ? 3 : 2),
physics: const NeverScrollableScrollPhysics(), // physics: const NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(left: 24.w, right: 24.w, bottom: 24.h), // padding: EdgeInsets.only(left: 24.w, right: 24.w, bottom: 24.h),
shrinkWrap: true, // shrinkWrap: true,
children: [ // children: [
Container( // Container(
padding: EdgeInsets.all(16.w), // padding: EdgeInsets.all(16.w),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, // color: AppColors.whiteColor,
borderRadius: 20.r, // borderRadius: 20.r,
hasShadow: true, // hasShadow: true,
), // ),
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
// spacing: 4.h, // // spacing: 4.h,
children: [ // children: [
Row( // Row(
spacing: 8.w, // spacing: 8.w,
crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: [ // children: [
Utils.buildSvgWithAssets(icon: AppAssets.wallet, width: 40.w, height: 40.h, applyThemeColor: false), // Utils.buildSvgWithAssets(icon: AppAssets.wallet, width: 40.w, height: 40.h, applyThemeColor: false),
LocaleKeys.habibWallet.tr(context: context).toText16(weight: FontWeight.w600, maxlines: 2).expanded, // LocaleKeys.habibWallet.tr(context: context).toText16(weight: FontWeight.w600, maxlines: 2).expanded,
Utils.buildSvgWithAssets(icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward), // Utils.buildSvgWithAssets(icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward),
], // ],
), // ),
Spacer(), // Spacer(),
Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) { // Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
return Utils.getPaymentAmountWithSymbol2(habibWalletVM.habibWalletAmount, isExpanded: false) // return Utils.getPaymentAmountWithSymbol2(habibWalletVM.habibWalletAmount, isExpanded: false)
.toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.r, width: 80.w, height: 24.h); // .toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.r, width: 80.w, height: 24.h);
}), // }),
Spacer(), // Spacer(),
CustomButton( // CustomButton(
height: 40.h, // height: 40.h,
icon: AppAssets.recharge_icon, // icon: AppAssets.recharge_icon,
iconSize: 22.w, // iconSize: 22.w,
iconColor: AppColors.infoColor, // iconColor: AppColors.infoColor,
textColor: AppColors.infoColor, // textColor: AppColors.infoColor,
text: LocaleKeys.recharge.tr(context: context), // text: LocaleKeys.recharge.tr(context: context),
borderWidth: 0.w, // borderWidth: 0.w,
fontWeight: FontWeight.w500, // fontWeight: FontWeight.w500,
borderColor: Colors.transparent, // borderColor: Colors.transparent,
backgroundColor: Color(0xff45A2F8).withValues(alpha: 0.08), // backgroundColor: Color(0xff45A2F8).withValues(alpha: 0.08),
padding: EdgeInsets.all(8.w), // padding: EdgeInsets.all(8.w),
fontSize: 14.f, // fontSize: 14.f,
onPressed: () { // onPressed: () {
Navigator.of(context).push(CustomPageRoute(page: RechargeWalletPage())); // Navigator.of(context).push(CustomPageRoute(page: RechargeWalletPage()));
}, // },
), // ),
], // ],
).onPress(() { // ).onPress(() {
Navigator.of(context).push(CustomPageRoute(page: HabibWalletPage())); // Navigator.of(context).push(CustomPageRoute(page: HabibWalletPage()));
}), // }),
), // ),
], // ],
), // ),
LocaleKeys.quickActions.tr(context: context).toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w), LocaleKeys.quickActions.tr(context: context).toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w),
Container( Container(
margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h), margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h),
@ -253,31 +258,31 @@ class ProfileSettingsState extends State<ProfileSettings> {
// ], // ],
// ), // ),
// ), // ),
LocaleKeys.personalInformation.tr(context: context).toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w), // LocaleKeys.personalInformation.tr(context: context).toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w),
Container( // Container(
margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h), // margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h),
padding: EdgeInsets.only(top: 4.h, bottom: 4.h), // padding: EdgeInsets.only(top: 4.h, bottom: 4.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true), // decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true),
child: Column( // child: Column(
children: [ // children: [
actionItem(AppAssets.email_transparent, LocaleKeys.updateEmailAddress.tr(context: context), () { // actionItem(AppAssets.email_transparent, LocaleKeys.updateEmailAddress.tr(context: context), () {
showCommonBottomSheetWithoutHeight( // showCommonBottomSheetWithoutHeight(
context, // context,
title: LocaleKeys.updateEmailAddress.tr(context: context), // title: LocaleKeys.updateEmailAddress.tr(context: context),
child: UpdateEmailDialog(), // child: UpdateEmailDialog(),
callBackFunc: () {}, // callBackFunc: () {},
isFullScreen: false, // isFullScreen: false,
); // );
}), // }),
// 1.divider, // // 1.divider,
// actionItem(AppAssets.smart_phone_fill, "Phone Number".needTranslation, () {}), // // actionItem(AppAssets.smart_phone_fill, "Phone Number".needTranslation, () {}),
// 1.divider, // // 1.divider,
// actionItem(AppAssets.my_address, "My Addresses".needTranslation, () {}), // // actionItem(AppAssets.my_address, "My Addresses".needTranslation, () {}),
// 1.divider, // // 1.divider,
// actionItem(AppAssets.emergency, "Emergency Contact".needTranslation, () {}), // // actionItem(AppAssets.emergency, "Emergency Contact".needTranslation, () {}),
], // ],
), // ),
), // ),
LocaleKeys.helpAndSupport.tr(context: context).toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w), LocaleKeys.helpAndSupport.tr(context: context).toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w),
Container( Container(
margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h), margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h),
@ -289,6 +294,19 @@ class ProfileSettingsState extends State<ProfileSettings> {
launchUrl(Uri.parse("tel://" + "+966 92 006 6666")); launchUrl(Uri.parse("tel://" + "+966 92 006 6666"));
}, trailingLabel: "92 006 6666"), }, trailingLabel: "92 006 6666"),
1.divider, 1.divider,
actionItem(AppAssets.feedbackFill, LocaleKeys.feedback.tr(context: context), () {
contactUsViewModel.setSelectedFeedbackType(
FeedbackType(id: 5, nameEN: "Not classified", nameAR: 'غير محدد'),
);
contactUsViewModel.setIsSendFeedbackTabSelected(true);
Navigator.pop(context);
Navigator.of(context).push(
CustomPageRoute(
page: FeedbackPage(),
),
);
}, trailingLabel: ""),
1.divider,
// actionItem(AppAssets.permission, LocaleKeys.permissions.tr(context: context), () {}, trailingLabel: "Location, Camera"), // actionItem(AppAssets.permission, LocaleKeys.permissions.tr(context: context), () {}, trailingLabel: "Location, Camera"),
// 1.divider, // 1.divider,
actionItem(AppAssets.rate, LocaleKeys.rateApp.tr(context: context), () { actionItem(AppAssets.rate, LocaleKeys.rateApp.tr(context: context), () {

@ -166,7 +166,7 @@ class DialogServiceImp implements DialogService {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
if (message != null) (message).toText16(isBold: false, color: AppColors.textColor), if (message != null) (message).toText16(isBold: false, color: AppColors.textColor),
SizedBox(height: 24.h), // SizedBox(height: 24.h),
FamilyCards( FamilyCards(
profiles: profiles, profiles: profiles,
onSelect: (FamilyFileResponseModelLists profile) { onSelect: (FamilyFileResponseModelLists profile) {
@ -190,6 +190,7 @@ class DialogServiceImp implements DialogService {
}) })
], ],
), ),
useSafeArea: true,
callBackFunc: () {}); callBackFunc: () {});
} }

@ -8,7 +8,7 @@ class AppColors {
static const transparent = Colors.transparent; static const transparent = Colors.transparent;
// Scaffold / Background // Scaffold / Background
static Color get scaffoldBgColor => isDarkMode ? dark.scaffoldBgColor : const Color(0xFFF8F8F8); static Color get scaffoldBgColor => isDarkMode ? dark.scaffoldBgColor : const Color(0xFFF0F0F0);
static Color get bottomSheetBgColor => isDarkMode ? dark.bottomSheetBgColor : const Color(0xFFF8F8FA); static Color get bottomSheetBgColor => isDarkMode ? dark.bottomSheetBgColor : const Color(0xFFF8F8FA);
static Color get lightGreyEFColor => isDarkMode ? dark.lightGreyEFColor : const Color(0xffeaeaff); static Color get lightGreyEFColor => isDarkMode ? dark.lightGreyEFColor : const Color(0xffeaeaff);
static Color get greyF7Color => isDarkMode ? dark.greyF7Color : const Color(0xffF7F7F7); static Color get greyF7Color => isDarkMode ? dark.greyF7Color : const Color(0xffF7F7F7);

Loading…
Cancel
Save