updates & fixes

pull/206/head
haroon amjad 2 days ago
parent 93af246700
commit deca29b423

@ -1640,9 +1640,10 @@
"homeHealthCareServiceDescription": "نقدم لكم رعاية صحية عالية الجودة تصلكم إلى عتبة منزلكم. ممرضات ذوات خبرة يقدمون رعاية حانية في راحة منزلكم.",
"profileOnlyText": "الملف الشخصي",
"information": "معلومة",
"noFavouriteDoctors": "ليس لديك أي أطباء مفضلين حتى الآن",
"noFavouriteDoctors": "ليس لديك أي قائمة مفضلة حتى الآن",
"addDoctors": "إضافة الأطباء",
"favouriteList": "قائمة المفضلة",
"later": "لاحقاً"
"later": "لاحقاً",
"cancelAppointmentConfirmMessage": "هل أنت متأكد من رغبتك في إلغاء هذا الموعد؟"
}

@ -1632,8 +1632,9 @@
"homeHealthCareServiceDescription": "We bring quality healthcare to your doorstep. Experienced nurses providing compassionate care in the comfort of your home.",
"profileOnlyText": "Profile",
"information": "Information",
"noFavouriteDoctors": "You don't have any favourite doctors yet",
"noFavouriteDoctors": "You don't have any favourite list yet",
"addDoctors": "Add Doctors",
"favouriteList": "Favourite List",
"later": "Later"
"later": "Later",
"cancelAppointmentConfirmMessage": "Are you sure you want to cancel this appointment?"
}

@ -919,8 +919,6 @@ class HmgServicesRepoImp implements HmgServicesRepo {
@override
Future<Either<Failure, GenericApiModel<List<VitalSignResModel>>>> getPatientVitalSign() async {
Map<String, dynamic> requestBody = {
};
try {

@ -513,7 +513,10 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo {
try {
final list = response['PatientDoctorAppointmentResultList'];
final appointmentsList = list.map((item) => PatientAppointmentHistoryResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<PatientAppointmentHistoryResponseModel>();
List<PatientAppointmentHistoryResponseModel> appointmentsList =
list.map((item) => PatientAppointmentHistoryResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<PatientAppointmentHistoryResponseModel>();
appointmentsList.removeWhere((element) => element.isActiveDoctorProfile == false);
apiResponse = GenericApiModel<List<PatientAppointmentHistoryResponseModel>>(
messageStatus: messageStatus,

@ -94,6 +94,10 @@ class MyAppointmentsViewModel extends ChangeNotifier {
selectedTabIndex = index;
start = null;
end = null;
// if (index == 0) {
// filteredAppointmentList.clear();
// filteredAppointmentList.addAll(patientAppointmentsHistoryList);
// }
notifyListeners();
}

@ -1636,5 +1636,6 @@ abstract class LocaleKeys {
static const addDoctors = 'addDoctors';
static const favouriteList = 'favouriteList';
static const later = 'later';
static const cancelAppointmentConfirmMessage = 'cancelAppointmentConfirmMessage';
}

@ -37,6 +37,7 @@ import 'package:hmg_patient_app_new/presentation/ask_doctor/doctor_response_page
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart';
import 'package:hmg_patient_app_new/presentation/contact_us/feedback_page.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_detail_page.dart';
import 'package:hmg_patient_app_new/services/dialog_service.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/buttons/custom_button.dart';
@ -148,41 +149,55 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
});
},
onCancelTap: () async {
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.cancellingAppointmentPleaseWait.tr(context: context));
await myAppointmentsViewModel.cancelAppointment(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) {
LoaderBottomSheet.hideLoader();
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.getPatientAppointments(true, false);
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentCancelledSuccessfully.tr(context: context)),
callBackFunc: () {
Navigator.of(context).pop();
},
title: "",
isCloseButtonVisible: true,
isDismissible: false,
isFullScreen: false,
);
},
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err.toString()),
callBackFunc: () {},
title: "",
isCloseButtonVisible: true,
isDismissible: false,
isFullScreen: false,
);
});
var isEventAddedOrRemoved = await CalenderUtilsNew.instance.checkAndRemove( id:"${widget.patientAppointmentHistoryResponseModel.appointmentNo}", );
setState(() {
myAppointmentsViewModel.setAppointmentReminder(isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel);
});
showCommonBottomSheetWithoutHeight(
title: LocaleKeys.notice.tr(context: context),
context,
child: Utils.getWarningWidget(
loadingText: LocaleKeys.cancelAppointmentConfirmMessage.tr(context: context),
isShowActionButtons: true,
onCancelTap: () {
Navigator.of(context).pop();
},
onConfirmTap: () async {
Navigator.of(context).pop();
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.cancellingAppointmentPleaseWait.tr(context: context));
await myAppointmentsViewModel.cancelAppointment(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) async {
LoaderBottomSheet.hideLoader();
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.getPatientAppointments(true, false);
showCommonBottomSheet(
context,
child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentCancelledSuccessfully.tr(context: context)),
callBackFunc: (str) {
Navigator.of(context).pop();
},
title: "",
isCloseButtonVisible: false,
isDismissible: false,
isFullScreen: false,
isAutoDismiss: true,
height: ResponsiveExtension.screenHeight * 0.3,
);
},
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err.toString()),
callBackFunc: () {},
title: "", isCloseButtonVisible: true, isDismissible: false, isFullScreen: false);
});
}),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
// var isEventAddedOrRemoved = await CalenderUtilsNew.instance.checkAndRemove( id:"${widget.patientAppointmentHistoryResponseModel.appointmentNo}", );
// setState(() {
// myAppointmentsViewModel.setAppointmentReminder(isEventAddedOrRemoved, widget.patientAppointmentHistoryResponseModel);
// });
},
onRescheduleTap: () async {
openDoctorScheduleCalendar();
@ -987,7 +1002,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
doctorImageURL: widget.patientAppointmentHistoryResponseModel.doctorImageURL,
doctorTitle: widget.patientAppointmentHistoryResponseModel.doctorTitle,
name: widget.patientAppointmentHistoryResponseModel.doctorNameObj,
nationalityFlagURL: "https://hmgwebservices.com/Images/flag/SYR.png",
nationalityFlagURL: "",
speciality: [],
clinicName: widget.patientAppointmentHistoryResponseModel.clinicName,
projectName: widget.patientAppointmentHistoryResponseModel.projectName,
@ -1036,17 +1051,18 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
myAppointmentsViewModel.initAppointmentsViewModel();
myAppointmentsViewModel.getPatientAppointments(true, false);
Navigator.of(context).pop();
},
title: "",
height: ResponsiveExtension.screenHeight * 0.3,
isCloseButtonVisible: true,
isDismissible: false,
isFullScreen: false,
}, title: "", height: ResponsiveExtension.screenHeight * 0.3, isAutoDismiss: true, isCloseButtonVisible: true, isDismissible: false, isFullScreen: false,
isSuccessDialog: true);
});
// LoaderBottomSheet.hideLoader();
case 15:
break;
getIt.get<DialogService>().showCommonBottomSheetWithoutH(
message: LocaleKeys.upcomingPaymentPending.tr(context: context),
label: LocaleKeys.notice.tr(),
onOkPressed: () {},
okLabel: "confirm",
cancelLabel: LocaleKeys.confirm.tr(context: context),
);
case 20:
myAppointmentsViewModel.setIsPatientAppointmentShareLoading(true);
Navigator.of(context).push(

@ -144,7 +144,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
? myAppointmentsVM.patientAppointmentsViewList.length
: 1,
itemBuilder: (context, index) {
final isExpanded = expandedIndex == index;
final isExpanded = myAppointmentsVM.selectedTabIndex == 1 ? true : expandedIndex == index;
return myAppointmentsVM.isMyAppointmentsLoading
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),

@ -456,7 +456,7 @@ class AppointmentCard extends StatelessWidget {
doctorImageURL: patientAppointmentHistoryResponseModel.doctorImageURL,
doctorTitle: patientAppointmentHistoryResponseModel.doctorTitle,
name: patientAppointmentHistoryResponseModel.doctorNameObj,
nationalityFlagURL: 'https://hmgwebservices.com/Images/flag/SYR.png',
nationalityFlagURL: '',
speciality: [],
clinicName: patientAppointmentHistoryResponseModel.clinicName,
projectName: patientAppointmentHistoryResponseModel.projectName,

@ -180,7 +180,7 @@ class DoctorProfilePage extends StatelessWidget {
SizedBox(height: 16.h),
LocaleKeys.information.tr(context: context).toText14(weight: FontWeight.w600, color: AppColors.textColor),
SizedBox(height: 6.h),
bookAppointmentsViewModel.doctorsProfileResponseModel.doctorProfileInfo!.toText12(fontWeight: FontWeight.w600, color: AppColors.greyTextColor),
(bookAppointmentsViewModel.doctorsProfileResponseModel.doctorProfileInfo ?? "").trim().toText12(fontWeight: FontWeight.w600, color: AppColors.greyTextColor),
SizedBox(height: 24.h),
],
).paddingSymmetrical(24.h, 0.h),
@ -199,7 +199,12 @@ class DoctorProfilePage extends StatelessWidget {
bookAppointmentsViewModel.selectedDoctor.speciality = bookAppointmentsViewModel.doctorsProfileResponseModel.specialty;
bookAppointmentsViewModel.selectedDoctor.specialityN = bookAppointmentsViewModel.doctorsProfileResponseModel.specialty;
bookAppointmentsViewModel.selectedDoctor.name = bookAppointmentsViewModel.doctorsProfileResponseModel.doctorName;
bookAppointmentsViewModel.selectedDoctor.name = bookAppointmentsViewModel.doctorsProfileResponseModel.doctorName;
bookAppointmentsViewModel.selectedDoctor.doctorImageURL = bookAppointmentsViewModel.doctorsProfileResponseModel.doctorImageURL;
bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL = bookAppointmentsViewModel.doctorsProfileResponseModel.nationalityFlagURL;
bookAppointmentsViewModel.selectedDoctor.clinicName = bookAppointmentsViewModel.doctorsProfileResponseModel.clinicDescription;
bookAppointmentsViewModel.selectedDoctor.projectName = bookAppointmentsViewModel.doctorsProfileResponseModel.projectName;
LoaderBottomSheet.showLoader();
bookAppointmentsViewModel.isLiveCareSchedule
? await bookAppointmentsViewModel.getLiveCareDoctorFreeSlots(

@ -93,6 +93,7 @@ class LaserAppointment extends StatelessWidget {
viewmodel.getLaserClinic();
},
),
SizedBox(height: 8.h),
Selector<BookAppointmentsViewModel, int>(
selector: (_, vm) => vm.selectedBodyTypeIndex,
builder: (_, bodyType, __) {
@ -110,6 +111,7 @@ class LaserAppointment extends StatelessWidget {
});
},
),
SizedBox(height: 8.h),
Selector<BookAppointmentsViewModel, List<LaserBodyPart>>(selector: (_, vm) => vm.laserBodyPartsList, builder:(_, parts,__){
return BodyPartsListing(
parts: parts,

@ -1,9 +1,12 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.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/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/laser_body_parts_data.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/laser_body_parts.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:provider/provider.dart';
@ -70,7 +73,7 @@ class BodyPartsListing extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AspectRatio(
aspectRatio: 97 / 97,
aspectRatio: 130 / 120,
child: FittedBox(
fit: BoxFit.fitWidth,
child: Stack(
@ -93,12 +96,12 @@ class BodyPartsListing extends StatelessWidget {
Container(
width: 18.h,
height: 18.h,
child: Icon(Icons.done,
color: Colors.white, size: 12.h),
decoration: BoxDecoration(
color: AppColors.primaryRedColor,
borderRadius: BorderRadius.circular(30.h),
),
child: Icon(Icons.done,
color: Colors.white, size: 12.h),
),
],
),
@ -106,17 +109,19 @@ class BodyPartsListing extends StatelessWidget {
),
SizedBox(height: 6.h),
Expanded(
child: Text(
context
.read<BookAppointmentsViewModel>()
.getLaserProcedureNameWRTLanguage(parts[index]),
style: TextStyle(
fontSize: 12.f,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.48,
child: Center(
child: Column(
children: [
context.read<BookAppointmentsViewModel>().getLaserProcedureNameWRTLanguage(parts[index]).toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
"${LocaleKeys.mins.tr()}: ".toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
parts[index].timeDuration!.toText12(isBold: true, color: AppColors.textColor, isCenter: true, maxLine: 2),
],
),
],
),
maxLines: 1,
),
),
],

@ -90,7 +90,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
.toString()
.toText16(isBold: true, maxlines: 1),
SizedBox(width: 12.w),
bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL!.isNotEmpty ? Image.network(
(bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL != null && bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL!.isNotEmpty )? Image.network(
bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL ?? "https://hmgwebservices.com/Images/flag/SAU.png",
width: 20.h,
height: 15.h,

@ -220,7 +220,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
],
).paddingSymmetrical(0.h, 0.h),
if (bookAppointmentsViewModel.isGetDocForHealthCal && bookAppointmentsVM.showSortFilterButtons) SizedBox(height: 16.h),
Row(
bookAppointmentsVM.selectedClinic.clinicID != 17 ? Row(
mainAxisSize: MainAxisSize.max,
children: [
Column(
@ -241,7 +241,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
},
),
],
),
) : SizedBox.shrink(),
ListView.separated(
padding: EdgeInsets.only(top: 16.h),
shrinkWrap: true,

@ -83,6 +83,8 @@ class ContactUs extends StatelessWidget {
LocaleKeys.liveChatWithHMG.tr(),
).onPress(() {
if (getIt.get<AppState>().isAuthenticated) {
Navigator.of(context).pop();
contactUsViewModel.getLiveChatProjectsList();
Navigator.of(context).push(
CustomPageRoute(
page: LiveChatPage(),

@ -121,7 +121,9 @@ class LiveChatPage extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM")
("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}"
// "\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM"
)
.toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? Colors.white : AppColors.textColor),
Transform.flip(
flipX: getIt.get<AppState>().isArabic(),

@ -365,6 +365,8 @@ class _LandingPageState extends State<LandingPage> {
),
],
).paddingSymmetrical(24.h, 0.h).onPress(() {
myAppointmentsViewModel.onTabChange(0);
myAppointmentsViewModel.updateListWRTTab(0);
Navigator.of(context).push(CustomPageRoute(page: MyAppointmentsPage()));
}),
Consumer3<MyAppointmentsViewModel, ImmediateLiveCareViewModel, TodoSectionViewModel>(

@ -27,7 +27,7 @@ class LabResultList extends StatelessWidget {
shrinkWrap: true,itemCount: list.length,itemBuilder: (____, index) {
var labItem = list[index];
return LabOrderResultItem(onTap: () {
model.getPatientLabResult(model.currentlySelectedPatientOrder!, labItem.description ?? "", labItem.testShortDescription!, labItem.uOM ?? "");
model.getPatientLabResult(model.currentlySelectedPatientOrder!, labItem.description ?? "", labItem.testShortDescription ?? "", labItem.uOM ?? "");
},
tests: labItem,
index: index,

@ -546,7 +546,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
doctorImageURL: patientAppointmentHistoryResponseModel.doctorImageURL,
doctorTitle: patientAppointmentHistoryResponseModel.doctorTitle,
name: patientAppointmentHistoryResponseModel.doctorNameObj,
nationalityFlagURL: "https://hmgwebservices.com/Images/flag/SYR.png",
nationalityFlagURL: "",
speciality: [],
clinicName: patientAppointmentHistoryResponseModel.clinicName,
projectName: patientAppointmentHistoryResponseModel.projectName,
@ -1566,7 +1566,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
label: LocaleKeys.weight.tr(context: context),
value: vitalSign.weightKg?.toString() ?? '--',
unit: 'kg',
status: vitalSign.weightKg != null ? "Normal" : null,
status: vitalSign.weightKg != null ? _getWeightStatus(vitalSign.bodyMassIndex) : null,
onTap: onTap,
),
),
@ -1593,6 +1593,11 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
return VitalSignUiModel.bmiStatus(bmi);
}
String? _getWeightStatus(dynamic bmi) {
if (bmi == null) return 'Normal';
return VitalSignUiModel.bmiStatus(bmi);
}
String? _getBloodPressureStatus({dynamic systolic, dynamic diastolic}) {
return VitalSignUiModel.bloodPressureStatus(systolic: systolic, diastolic: diastolic);
}

@ -26,7 +26,7 @@ class RateAppointmentDoctor extends StatefulWidget {
class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
final formKey = GlobalKey<FormState>();
String note = "";
int rating = 5;
int rating = 0;
// ProjectViewModel? projectViewModel;
AppointmentRatingViewModel? appointmentRatingViewModel;
@ -145,7 +145,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
decoration: InputDecoration.collapsed(
hintText: LocaleKeys.notes.tr(context: context),
hintStyle: TextStyle(
fontSize: 16,
fontSize: 16.f,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.64,

@ -36,32 +36,26 @@ class BuildDoctorRow extends StatelessWidget {
SizedBox(height: 8.h),
isForClinic ? Wrap(
direction: Axis.horizontal,
spacing: 3.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(
labelText:
appointmentDetails!.clinicName.toString(),
),
AppCustomChipWidget(
icon: AppAssets.ic_date_filter,
labelText:
DateUtil.formatDateToDate(DateUtil.convertStringToDate(appointmentDetails!.appointmentDate), false),
),
AppCustomChipWidget(
icon: AppAssets.appointment_time_icon,
labelText:
appointmentDetails!.startTime.substring(0, appointmentDetails!.startTime.length - 3),
),
]
) : Wrap(
direction: Axis.horizontal,
@ -69,26 +63,26 @@ class BuildDoctorRow extends StatelessWidget {
runSpacing: 4.h,
children: [
AppCustomChipWidget(
labelText:
appointmentDetails!.projectName.toString(),
),
AppCustomChipWidget(
labelText:
appointmentDetails!.clinicName.toString(),
)
]
)
],
),
AppCustomChipWidget(
labelPadding: EdgeInsetsDirectional.only(start: -8.w, end: 6.w),
icon: AppAssets.ic_date_filter,
labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(appointmentDetails!.appointmentDate), false),
),
],
),
],
),
),
),
],
));
),
);
}
}

@ -89,6 +89,21 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
),
_whatIsThisResultCard(context),
_historyCard(context, history: history),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 16.r,
hasShadow: false,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.history.tr(context: context).toText16(isBold: true, color: AppColors.textColor),
SizedBox(height: 16.h),
_buildHistoryList(context, history),
],
).paddingSymmetrical(16.h, 16.h),
),
],
).paddingAll(24.h),
);
@ -264,35 +279,27 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
_isGraphVisible ? LocaleKeys.historyFlowchart.tr(context: context) : LocaleKeys.history.tr(context: context),
style: TextStyle(
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
color: AppColors.textColor,
),
),
LocaleKeys.historyFlowchart.tr(context: context).toText16(isBold: true, color: AppColors.textColor),
Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 24.h,
height: 24.h,
alignment: Alignment.center,
child: InkWell(
onTap: () {
setState(() {
_isGraphVisible = !_isGraphVisible;
});
},
child: Utils.buildSvgWithAssets(
icon: _isGraphVisible ? AppAssets.ic_list : AppAssets.ic_graph,
width: 24.h,
height: 24.h,
),
),
),
// Container(
// width: 24.h,
// height: 24.h,
// alignment: Alignment.center,
// child: InkWell(
// onTap: () {
// setState(() {
// _isGraphVisible = !_isGraphVisible;
// });
// },
// child: Utils.buildSvgWithAssets(
// icon: _isGraphVisible ? AppAssets.ic_list : AppAssets.ic_graph,
// width: 24.h,
// height: 24.h,
// ),
// ),
// ),
// SizedBox(width: 16.h),
// Container(
// width: 24.h,
@ -663,7 +670,8 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
case VitalSignMetric.height:
return null;
case VitalSignMetric.weight:
return latest.weightKg != null ? 'Normal' : null;
// return latest.weightKg != null ? 'Normal' : null;
return VitalSignUiModel.bmiStatus(latest.bodyMassIndex);
case VitalSignMetric.temperature:
return null;
case VitalSignMetric.heartRate:

@ -138,11 +138,13 @@ class _VitalSignPageState extends State<VitalSignPage> {
label: LocaleKeys.weight.tr(context: context),
value: latestVitalSign?.weightKg?.toString() ?? '--',
unit: 'kg',
status: (latestVitalSign?.weightKg != null) ? 'Normal' : null,
status: (latestVitalSign?.weightKg != null)
? VitalSignUiModel.bmiStatus(latestVitalSign?.bodyMassIndex)
: null,
onTap: () => _openDetails(
VitalSignDetailsArgs(
metric: VitalSignMetric.weight,
title: LocaleKeys.height.tr(context: context),
title: LocaleKeys.weight.tr(context: context),
icon: AppAssets.weightVital,
unit: 'kg',
),

@ -116,6 +116,7 @@ void showCommonBottomSheet(BuildContext context,
Function(String?)? callBackFunc,
String? title,
required double height,
bool isAutoDismiss = false,
bool isCloseButtonVisible = true,
bool isFullScreen = true,
bool isDismissible = true,
@ -131,6 +132,14 @@ void showCommonBottomSheet(BuildContext context,
isDismissible: isDismissible,
backgroundColor: isSuccessDialog ? AppColors.whiteColor : AppColors.scaffoldBgColor,
builder: (BuildContext context) {
if (isAutoDismiss) {
Future.delayed(Duration(seconds: 2), () {
Navigator.of(context).pop();
if (callBackFunc != null) {
callBackFunc(null);
}
});
}
return Container(
height: height,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.scaffoldBgColor, borderRadius: 24.h),
@ -214,6 +223,7 @@ void showCommonBottomSheetWithoutHeight(
bool isCloseButtonVisible = true,
bool isFullScreen = true,
bool isDismissible = true,
bool isAutoDismiss = false,
Widget? titleWidget,
bool useSafeArea = false,
bool hasBottomPadding = true,
@ -237,6 +247,14 @@ void showCommonBottomSheetWithoutHeight(
backgroundColor: resolvedBgColor,
useSafeArea: useSafeArea,
builder: (BuildContext context) {
if (isAutoDismiss) {
Future.delayed(Duration(seconds: 2), () {
Navigator.of(context).pop();
if (callBackFunc != null) {
callBackFunc();
}
});
}
return SafeArea(
top: false,
left: false,

Loading…
Cancel
Save