diff --git a/lib/features/hmg_services/hmg_services_view_model.dart b/lib/features/hmg_services/hmg_services_view_model.dart index 5ced7d57..d76814ec 100644 --- a/lib/features/hmg_services/hmg_services_view_model.dart +++ b/lib/features/hmg_services/hmg_services_view_model.dart @@ -915,8 +915,10 @@ class HmgServicesViewModel extends ChangeNotifier { if (apiResponse.messageStatus == 1) { vitalSignList = apiResponse.data ?? []; hasVitalSignDataLoaded = true; - getIt.get().setSelectedHeight(vitalSignList.first.heightCm); - getIt.get().setSelectedWeight(vitalSignList.first.weightKg); + if (vitalSignList.isNotEmpty) { + getIt.get().setSelectedHeight(vitalSignList.first.heightCm); + getIt.get().setSelectedWeight(vitalSignList.first.weightKg); + } notifyListeners(); if (onSuccess != null) { onSuccess(apiResponse); diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 30fe1132..7104e42d 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -1837,5 +1837,6 @@ abstract class LocaleKeys { static const maxOneFileAllowed = 'maxOneFileAllowed'; static const fileSizeExceedsLimit = 'fileSizeExceedsLimit'; static const completedPrescriptionOrder = 'completedPrescriptionOrder'; + static const submitReferral = 'submitReferral'; }