Merge pull request 'haroon_dev' (#77) from haroon_dev into master

Reviewed-on: #77
pull/78/head
Haroon6138 3 weeks ago
commit c1b88a958f

@ -174,7 +174,7 @@ class ApiClientImp implements ApiClient {
} }
// body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
// body['PatientID'] = 4767884; // body['PatientID'] = 4772172;
// body['PatientTypeID'] = 1; // body['PatientTypeID'] = 1;
// //
// body['PatientOutSA'] = 0; // body['PatientOutSA'] = 0;

@ -8,6 +8,7 @@ import 'package:hmg_patient_app_new/features/authentication/authentication_view_
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_repo.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_repo.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/common/common_repo.dart'; import 'package:hmg_patient_app_new/features/common/common_repo.dart';
import 'package:hmg_patient_app_new/features/doctor_filter/doctor_filter_view_model.dart';
import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_repo.dart'; import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_repo.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/immediate_livecare/immediate_livecare_repo.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_repo.dart';
@ -18,6 +19,7 @@ import 'package:hmg_patient_app_new/features/lab/lab_repo.dart';
import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart'; import 'package:hmg_patient_app_new/features/lab/lab_view_model.dart';
import 'package:hmg_patient_app_new/features/medical_file/medical_file_repo.dart'; import 'package:hmg_patient_app_new/features/medical_file/medical_file_repo.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/my_appointments/appointment_via_region_viewmodel.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.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';
import 'package:hmg_patient_app_new/features/payfort/payfort_repo.dart'; import 'package:hmg_patient_app_new/features/payfort/payfort_repo.dart';
@ -35,6 +37,7 @@ import 'package:hmg_patient_app_new/services/firebase_service.dart';
import 'package:hmg_patient_app_new/services/localauth_service.dart'; import 'package:hmg_patient_app_new/services/localauth_service.dart';
import 'package:hmg_patient_app_new/services/logger_service.dart'; import 'package:hmg_patient_app_new/services/logger_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/widgets/date_range_selector/viewmodel/date_range_view_model.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
import 'package:logger/web.dart'; import 'package:logger/web.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -169,6 +172,18 @@ class AppDependencies {
); );
getIt.registerLazySingleton<ProfileSettingsViewModel>(() => ProfileSettingsViewModel()); getIt.registerLazySingleton<ProfileSettingsViewModel>(() => ProfileSettingsViewModel());
getIt.registerLazySingleton<DateRangeSelectorRangeViewModel>(
() => DateRangeSelectorRangeViewModel(),
);
getIt.registerLazySingleton<DoctorFilterViewModel>(
() => DoctorFilterViewModel(),
);
getIt.registerLazySingleton<AppointmentViaRegionViewmodel>(
() => AppointmentViaRegionViewmodel(navigationService: getIt(), appState: getIt()),
);
// Screen-specific VMs Factory // Screen-specific VMs Factory
// getIt.registerFactory<BookAppointmentsViewModel>( // getIt.registerFactory<BookAppointmentsViewModel>(
// () => BookAppointmentsViewModel( // () => BookAppointmentsViewModel(

@ -29,6 +29,7 @@ import 'package:hmg_patient_app_new/features/authentication/models/resp_models/c
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart'; import 'package:hmg_patient_app_new/features/authentication/models/resp_models/select_device_by_imei.dart';
import 'package:hmg_patient_app_new/features/medical_file/medical_file_repo.dart'; import 'package:hmg_patient_app_new/features/medical_file/medical_file_repo.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/my_appointments/my_appointments_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/authentication/login.dart'; import 'package:hmg_patient_app_new/presentation/authentication/login.dart';
import 'package:hmg_patient_app_new/presentation/authentication/saved_login_screen.dart'; import 'package:hmg_patient_app_new/presentation/authentication/saved_login_screen.dart';
@ -345,8 +346,7 @@ class AuthenticationViewModel extends ChangeNotifier {
); );
} }
Future<void> sendActivationCode( Future<void> sendActivationCode({required OTPTypeEnum otpTypeEnum,
{required OTPTypeEnum otpTypeEnum,
required String nationalIdOrFileNumber, required String nationalIdOrFileNumber,
required String phoneNumber, required String phoneNumber,
required bool isForRegister, required bool isForRegister,
@ -593,6 +593,8 @@ class AuthenticationViewModel extends ChangeNotifier {
if (isUserAgreedBefore) { if (isUserAgreedBefore) {
navigateToHomeScreen(); navigateToHomeScreen();
} else { } else {
MyAppointmentsViewModel myAppointmentsVM = getIt<MyAppointmentsViewModel>();
myAppointmentsVM.setIsAppointmentDataToBeLoaded(true);
navigateToHomeScreen(); navigateToHomeScreen();
//Agreement page not designed yet so we are navigating to home screen directly //Agreement page not designed yet so we are navigating to home screen directly
// getUserAgreementContent(request: request); // getUserAgreementContent(request: request);

@ -3,6 +3,7 @@ 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/common_models/generic_api_model.dart'; import 'package:hmg_patient_app_new/core/common_models/generic_api_model.dart';
import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart'; import 'package:hmg_patient_app_new/core/exceptions/api_failure.dart';
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_approval_response_model.dart';
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_card_history.dart'; import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_card_history.dart';
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_details_response_model.dart'; import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_details_response_model.dart';
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_update_response_model.dart'; import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_update_response_model.dart';
@ -14,6 +15,8 @@ abstract class InsuranceRepo {
Future<Either<Failure, GenericApiModel<List<PatientInsuranceCardHistoryResponseModel>>>> getPatientInsuranceCardHistory(); Future<Either<Failure, GenericApiModel<List<PatientInsuranceCardHistoryResponseModel>>>> getPatientInsuranceCardHistory();
Future<Either<Failure, GenericApiModel<PatientInsuranceUpdateResponseModel>>> getPatientInsuranceDetailsForUpdate({required String patientId, required String identificationNo}); Future<Either<Failure, GenericApiModel<PatientInsuranceUpdateResponseModel>>> getPatientInsuranceDetailsForUpdate({required String patientId, required String identificationNo});
Future<Either<Failure, GenericApiModel<List<InsuranceApprovalResponseModel>>>> getPatientInsuranceApprovalsList();
} }
class InsuranceRepoImp implements InsuranceRepo { class InsuranceRepoImp implements InsuranceRepo {
@ -66,7 +69,6 @@ class InsuranceRepoImp implements InsuranceRepo {
@override @override
Future<Either<Failure, GenericApiModel<List<PatientInsuranceCardHistoryResponseModel>>>> getPatientInsuranceCardHistory() async { Future<Either<Failure, GenericApiModel<List<PatientInsuranceCardHistoryResponseModel>>>> getPatientInsuranceCardHistory() async {
Map<String, dynamic> mapDevice = {}; Map<String, dynamic> mapDevice = {};
try { try {
GenericApiModel<List<PatientInsuranceCardHistoryResponseModel>>? apiResponse; GenericApiModel<List<PatientInsuranceCardHistoryResponseModel>>? apiResponse;
Failure? failure; Failure? failure;
@ -144,4 +146,41 @@ class InsuranceRepoImp implements InsuranceRepo {
return Left(UnknownFailure(e.toString())); return Left(UnknownFailure(e.toString()));
} }
} }
@override
Future<Either<Failure, GenericApiModel<List<InsuranceApprovalResponseModel>>>> getPatientInsuranceApprovalsList() async {
Map<String, dynamic> mapDevice = {};
try {
GenericApiModel<List<InsuranceApprovalResponseModel>>? apiResponse;
Failure? failure;
await apiClient.post(
GET_PAtIENTS_INSURANCE_APPROVALS,
body: mapDevice,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
final list = response['HIS_Approval_List'];
final insuranceCardsList = list.map((item) => InsuranceApprovalResponseModel.fromJson(item as Map<String, dynamic>)).toList().cast<InsuranceApprovalResponseModel>();
apiResponse = GenericApiModel<List<InsuranceApprovalResponseModel>>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: null,
data: insuranceCardsList,
);
} catch (e) {
failure = DataParsingFailure(e.toString());
}
},
);
if (failure != null) return Left(failure!);
if (apiResponse == null) return Left(ServerFailure("Unknown error"));
return Right(apiResponse!);
} catch (e) {
return Left(UnknownFailure(e.toString()));
}
}
} }

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/features/insurance/insurance_repo.dart'; import 'package:hmg_patient_app_new/features/insurance/insurance_repo.dart';
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_approval_response_model.dart';
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_card_history.dart'; import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_card_history.dart';
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_details_response_model.dart'; import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_details_response_model.dart';
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_update_response_model.dart'; import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_update_response_model.dart';
@ -14,11 +15,14 @@ class InsuranceViewModel extends ChangeNotifier {
bool isInsuranceDataToBeLoaded = true; bool isInsuranceDataToBeLoaded = true;
bool isInsuranceApprovalsLoading = false;
InsuranceRepo insuranceRepo; InsuranceRepo insuranceRepo;
ErrorHandlerService errorHandlerService; ErrorHandlerService errorHandlerService;
List<PatientInsuranceDetailsResponseModel> patientInsuranceList = []; List<PatientInsuranceDetailsResponseModel> patientInsuranceList = [];
List<PatientInsuranceCardHistoryResponseModel> patientInsuranceCardHistoryList = []; List<PatientInsuranceCardHistoryResponseModel> patientInsuranceCardHistoryList = [];
List<InsuranceApprovalResponseModel> patientInsuranceApprovalsList = [];
PatientInsuranceUpdateResponseModel? patientInsuranceUpdateResponseModel; PatientInsuranceUpdateResponseModel? patientInsuranceUpdateResponseModel;
@ -34,6 +38,7 @@ class InsuranceViewModel extends ChangeNotifier {
isInsuranceHistoryLoading = true; isInsuranceHistoryLoading = true;
isInsuranceDetailsLoading = true; isInsuranceDetailsLoading = true;
isInsuranceUpdateDetailsLoading = true; isInsuranceUpdateDetailsLoading = true;
isInsuranceApprovalsLoading = true;
notifyListeners(); notifyListeners();
} }
@ -57,6 +62,11 @@ class InsuranceViewModel extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
setIsInsuranceApprovalsLoading(bool val) {
isInsuranceApprovalsLoading = val;
notifyListeners();
}
Future<void> getPatientInsuranceDetails({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getPatientInsuranceDetails({Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isInsuranceDataToBeLoaded) return; if (!isInsuranceDataToBeLoaded) return;
@ -130,4 +140,27 @@ class InsuranceViewModel extends ChangeNotifier {
}, },
); );
} }
Future<void> getPatientInsuranceApprovalsList({Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await insuranceRepo.getPatientInsuranceApprovalsList();
result.fold(
(failure) async {
isInsuranceApprovalsLoading = false;
notifyListeners();
},
(apiResponse) {
if (apiResponse.messageStatus == 2) {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) {
patientInsuranceApprovalsList = apiResponse.data!;
isInsuranceApprovalsLoading = false;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
}
}
},
);
}
} }

@ -0,0 +1,465 @@
class InsuranceApprovalResponseModel {
String? setupID;
int? projectID;
int? approvalNo;
String? approvalDate;
int? patientType;
int? patientID;
int? companyID;
int? subCategoryID;
int? doctorID;
int? clinicID;
int? approvalType;
String? inpatientApprovalSubType;
String? validFrom;
String? vaildDays;
String? validTo;
bool? isApprovalOnGross;
bool? isPackage;
int? requestedAmount;
int? actualApprovedAmount;
int? aviliableAmount;
String? companyApprovalNo;
int? progNoteOrderNo;
String? submitOn;
String? receiptOn;
String? remarks1;
String? remarks2;
int? status;
String? feedbackStatusBy;
String? feedbackStatus;
String? feedbackStatusOn;
int? authorizerID;
String? expiryDate;
int? appointmentNo;
int? admissionNo;
int? admissionRequestNo;
int? createdBy;
String? createdOn;
int? editedBy;
String? editedOn;
String? rowVer;
bool? isAddlDiscApplied;
int? inProgressReasonID;
String? extendedBy;
String? extendedOn;
int? subPolicyNo;
int? noOrderAuthorizerID;
bool? isVerbalApproval;
String? subStatus;
bool? isNotificationSend;
String? eApprovalStatus;
String? eApprovalRemarks;
bool? isEmailSentOnDelayApproval;
int? eAuthorizationID;
InsuranceApprovalDetails? apporvalDetails;
String? approvalStatusDescption;
String? clinicName;
String? clinicNameN;
String? companyName;
String? doctorImageURL;
String? doctorName;
String? doctorNameN;
int? doctorRate;
String? doctorTitle;
int? gender;
String? genderDescription;
bool? isActiveDoctorProfile;
bool? isExecludeDoctor;
bool? isInOutPatient;
String? isInOutPatientDescription;
String? isInOutPatientDescriptionN;
bool? isLiveCareAppointment;
String? projectName;
String? projectNameN;
String? qR;
List<String>? speciality;
String? strApprovalDate;
String? strExpiryDate;
String? strSubmitDate;
int? totaUnUsedCount;
int? unUsedCount;
InsuranceApprovalResponseModel(
{this.setupID,
this.projectID,
this.approvalNo,
this.approvalDate,
this.patientType,
this.patientID,
this.companyID,
this.subCategoryID,
this.doctorID,
this.clinicID,
this.approvalType,
this.inpatientApprovalSubType,
this.validFrom,
this.vaildDays,
this.validTo,
this.isApprovalOnGross,
this.isPackage,
this.requestedAmount,
this.actualApprovedAmount,
this.aviliableAmount,
this.companyApprovalNo,
this.progNoteOrderNo,
this.submitOn,
this.receiptOn,
this.remarks1,
this.remarks2,
this.status,
this.feedbackStatusBy,
this.feedbackStatus,
this.feedbackStatusOn,
this.authorizerID,
this.expiryDate,
this.appointmentNo,
this.admissionNo,
this.admissionRequestNo,
this.createdBy,
this.createdOn,
this.editedBy,
this.editedOn,
this.rowVer,
this.isAddlDiscApplied,
this.inProgressReasonID,
this.extendedBy,
this.extendedOn,
this.subPolicyNo,
this.noOrderAuthorizerID,
this.isVerbalApproval,
this.subStatus,
this.isNotificationSend,
this.eApprovalStatus,
this.eApprovalRemarks,
this.isEmailSentOnDelayApproval,
this.eAuthorizationID,
this.apporvalDetails,
this.approvalStatusDescption,
this.clinicName,
this.clinicNameN,
this.companyName,
this.doctorImageURL,
this.doctorName,
this.doctorNameN,
this.doctorRate,
this.doctorTitle,
this.gender,
this.genderDescription,
this.isActiveDoctorProfile,
this.isExecludeDoctor,
this.isInOutPatient,
this.isInOutPatientDescription,
this.isInOutPatientDescriptionN,
this.isLiveCareAppointment,
this.projectName,
this.projectNameN,
this.qR,
this.speciality,
this.strApprovalDate,
this.strExpiryDate,
this.strSubmitDate,
this.totaUnUsedCount,
this.unUsedCount});
InsuranceApprovalResponseModel.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
approvalNo = json['ApprovalNo'];
approvalDate = json['ApprovalDate'];
patientType = json['PatientType'];
patientID = json['PatientID'];
companyID = json['CompanyID'];
subCategoryID = json['SubCategoryID'];
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
approvalType = json['ApprovalType'];
inpatientApprovalSubType = json['InpatientApprovalSubType'];
validFrom = json['ValidFrom'];
vaildDays = json['VaildDays'];
validTo = json['ValidTo'];
isApprovalOnGross = json['IsApprovalOnGross'];
isPackage = json['IsPackage'];
requestedAmount = json['RequestedAmount'];
actualApprovedAmount = json['ActualApprovedAmount'];
aviliableAmount = json['AviliableAmount'];
companyApprovalNo = json['CompanyApprovalNo'];
progNoteOrderNo = json['ProgNoteOrderNo'];
submitOn = json['SubmitOn'];
receiptOn = json['ReceiptOn'];
remarks1 = json['Remarks1'];
remarks2 = json['Remarks2'];
status = json['Status'];
feedbackStatusBy = json['FeedbackStatusBy'];
feedbackStatus = json['FeedbackStatus'];
feedbackStatusOn = json['FeedbackStatusOn'];
authorizerID = json['AuthorizerID'];
expiryDate = json['ExpiryDate'];
appointmentNo = json['AppointmentNo'];
admissionNo = json['AdmissionNo'];
admissionRequestNo = json['AdmissionRequestNo'];
createdBy = json['CreatedBy'];
createdOn = json['CreatedOn'];
editedBy = json['EditedBy'];
editedOn = json['EditedOn'];
rowVer = json['RowVer'];
isAddlDiscApplied = json['IsAddlDiscApplied'];
inProgressReasonID = json['InProgressReasonID'];
extendedBy = json['ExtendedBy'];
extendedOn = json['ExtendedOn'];
subPolicyNo = json['SubPolicyNo'];
noOrderAuthorizerID = json['NoOrderAuthorizerID'];
isVerbalApproval = json['isVerbalApproval'];
subStatus = json['SubStatus'];
isNotificationSend = json['IsNotificationSend'];
eApprovalStatus = json['EApprovalStatus'];
eApprovalRemarks = json['EApprovalRemarks'];
isEmailSentOnDelayApproval = json['IsEmailSentOnDelayApproval'];
eAuthorizationID = json['EAuthorizationID'];
if (json['ApporvalDetails'] != null && json['ApporvalDetails'].length != 0) {
apporvalDetails = InsuranceApprovalDetails.fromJson(json['ApporvalDetails'][0]);
}
approvalStatusDescption = json['ApprovalStatusDescption'];
clinicName = json['ClinicName'];
clinicNameN = json['ClinicNameN'];
companyName = json['CompanyName'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
doctorRate = json['DoctorRate'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isExecludeDoctor = json['IsExecludeDoctor'];
isInOutPatient = json['IsInOutPatient'];
isInOutPatientDescription = json['IsInOutPatientDescription'];
isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
isLiveCareAppointment = json['IsLiveCareAppointment'];
projectName = json['ProjectName'];
projectNameN = json['ProjectNameN'];
qR = json['QR'];
if (json['Speciality'] != null) speciality = json['Speciality'].cast<String>();
strApprovalDate = json['StrApprovalDate'];
strExpiryDate = json['StrExpiryDate'];
strSubmitDate = json['StrSubmitDate'];
totaUnUsedCount = json['TotaUnUsedCount'];
unUsedCount = json['UnUsedCount'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['ApprovalNo'] = this.approvalNo;
data['ApprovalDate'] = this.approvalDate;
data['PatientType'] = this.patientType;
data['PatientID'] = this.patientID;
data['CompanyID'] = this.companyID;
data['SubCategoryID'] = this.subCategoryID;
data['DoctorID'] = this.doctorID;
data['ClinicID'] = this.clinicID;
data['ApprovalType'] = this.approvalType;
data['InpatientApprovalSubType'] = this.inpatientApprovalSubType;
data['ValidFrom'] = this.validFrom;
data['VaildDays'] = this.vaildDays;
data['ValidTo'] = this.validTo;
data['IsApprovalOnGross'] = this.isApprovalOnGross;
data['IsPackage'] = this.isPackage;
data['RequestedAmount'] = this.requestedAmount;
data['ActualApprovedAmount'] = this.actualApprovedAmount;
data['AviliableAmount'] = this.aviliableAmount;
data['CompanyApprovalNo'] = this.companyApprovalNo;
data['ProgNoteOrderNo'] = this.progNoteOrderNo;
data['SubmitOn'] = this.submitOn;
data['ReceiptOn'] = this.receiptOn;
data['Remarks1'] = this.remarks1;
data['Remarks2'] = this.remarks2;
data['Status'] = this.status;
data['FeedbackStatusBy'] = this.feedbackStatusBy;
data['FeedbackStatus'] = this.feedbackStatus;
data['FeedbackStatusOn'] = this.feedbackStatusOn;
data['AuthorizerID'] = this.authorizerID;
data['ExpiryDate'] = this.expiryDate;
data['AppointmentNo'] = this.appointmentNo;
data['AdmissionNo'] = this.admissionNo;
data['AdmissionRequestNo'] = this.admissionRequestNo;
data['CreatedBy'] = this.createdBy;
data['CreatedOn'] = this.createdOn;
data['EditedBy'] = this.editedBy;
data['EditedOn'] = this.editedOn;
data['RowVer'] = this.rowVer;
data['IsAddlDiscApplied'] = this.isAddlDiscApplied;
data['InProgressReasonID'] = this.inProgressReasonID;
data['ExtendedBy'] = this.extendedBy;
data['ExtendedOn'] = this.extendedOn;
data['SubPolicyNo'] = this.subPolicyNo;
data['NoOrderAuthorizerID'] = this.noOrderAuthorizerID;
data['isVerbalApproval'] = this.isVerbalApproval;
data['SubStatus'] = this.subStatus;
data['IsNotificationSend'] = this.isNotificationSend;
data['EApprovalStatus'] = this.eApprovalStatus;
data['EApprovalRemarks'] = this.eApprovalRemarks;
data['IsEmailSentOnDelayApproval'] = this.isEmailSentOnDelayApproval;
data['EAuthorizationID'] = this.eAuthorizationID;
if (this.apporvalDetails != null) {
data['ApporvalDetails'] = this.apporvalDetails!.toJson;
}
data['ApprovalStatusDescption'] = this.approvalStatusDescption;
data['ClinicName'] = this.clinicName;
data['ClinicNameN'] = this.clinicNameN;
data['CompanyName'] = this.companyName;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN;
data['DoctorRate'] = this.doctorRate;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
data['IsExecludeDoctor'] = this.isExecludeDoctor;
data['IsInOutPatient'] = this.isInOutPatient;
data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
data['ProjectName'] = this.projectName;
data['ProjectNameN'] = this.projectNameN;
data['QR'] = this.qR;
data['Speciality'] = this.speciality;
data['StrApprovalDate'] = this.strApprovalDate;
data['StrExpiryDate'] = this.strExpiryDate;
data['StrSubmitDate'] = this.strSubmitDate;
data['TotaUnUsedCount'] = this.totaUnUsedCount;
data['UnUsedCount'] = this.unUsedCount;
return data;
}
}
class InsuranceApprovalDetails {
int? setupID;
int? projectID;
int? approvalNo;
int? lineItemNo;
int? orderType;
int? procedureID;
int? toothNo;
int? price;
int? approvedAmount;
String? unapprovedPatientShare;
int? waivedAmount;
String? discountType;
int? discountValue;
String? shareType;
String? patientShareTypeValue;
String? companyShareTypeValue;
String? patientShare;
String? companyShare;
int? deductableAmount;
String? disapprovedRemarks;
int? progNoteOrderNo;
int? progNoteLineItemNo;
String? invoiceTransactionType;
int? invoiceNo;
String? procedureName;
String? procedureNameN;
String? status;
bool? isInvoiced;
String? isInvoicedDesc;
InsuranceApprovalDetails(
{this.setupID,
this.projectID,
this.approvalNo,
this.lineItemNo,
this.orderType,
this.procedureID,
this.toothNo,
this.price,
this.approvedAmount,
this.unapprovedPatientShare,
this.waivedAmount,
this.discountType,
this.discountValue,
this.shareType,
this.patientShareTypeValue,
this.companyShareTypeValue,
this.patientShare,
this.companyShare,
this.deductableAmount,
this.disapprovedRemarks,
this.progNoteOrderNo,
this.progNoteLineItemNo,
this.invoiceTransactionType,
this.invoiceNo,
this.procedureName,
this.procedureNameN,
this.status,
this.isInvoiced,
this.isInvoicedDesc});
InsuranceApprovalDetails.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
approvalNo = json['ApprovalNo'];
lineItemNo = json['LineItemNo'];
orderType = json['OrderType'];
procedureID = json['ProcedureID'];
toothNo = json['ToothNo'];
price = json['Price'];
approvedAmount = json['ApprovedAmount'];
unapprovedPatientShare = json['UnapprovedPatientShare'];
waivedAmount = json['WaivedAmount'];
discountType = json['DiscountType'];
discountValue = json['DiscountValue'];
shareType = json['ShareType'];
patientShareTypeValue = json['PatientShareTypeValue'];
companyShareTypeValue = json['CompanyShareTypeValue'];
patientShare = json['PatientShare'];
companyShare = json['CompanyShare'];
deductableAmount = json['DeductableAmount'];
disapprovedRemarks = json['DisapprovedRemarks'];
progNoteOrderNo = json['ProgNoteOrderNo'];
progNoteLineItemNo = json['ProgNoteLineItemNo'];
invoiceTransactionType = json['InvoiceTransactionType'];
invoiceNo = json['InvoiceNo'];
procedureName = json['ProcedureName'];
procedureNameN = json['ProcedureNameN'];
status = json['Status'];
isInvoiced = json['IsInvoiced'];
isInvoicedDesc = json['IsInvoicedDesc'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['ApprovalNo'] = this.approvalNo;
data['LineItemNo'] = this.lineItemNo;
data['OrderType'] = this.orderType;
data['ProcedureID'] = this.procedureID;
data['ToothNo'] = this.toothNo;
data['Price'] = this.price;
data['ApprovedAmount'] = this.approvedAmount;
data['UnapprovedPatientShare'] = this.unapprovedPatientShare;
data['WaivedAmount'] = this.waivedAmount;
data['DiscountType'] = this.discountType;
data['DiscountValue'] = this.discountValue;
data['ShareType'] = this.shareType;
data['PatientShareTypeValue'] = this.patientShareTypeValue;
data['CompanyShareTypeValue'] = this.companyShareTypeValue;
data['PatientShare'] = this.patientShare;
data['CompanyShare'] = this.companyShare;
data['DeductableAmount'] = this.deductableAmount;
data['DisapprovedRemarks'] = this.disapprovedRemarks;
data['ProgNoteOrderNo'] = this.progNoteOrderNo;
data['ProgNoteLineItemNo'] = this.progNoteLineItemNo;
data['InvoiceTransactionType'] = this.invoiceTransactionType;
data['InvoiceNo'] = this.invoiceNo;
data['ProcedureName'] = this.procedureName;
data['ProcedureNameN'] = this.procedureNameN;
data['Status'] = this.status;
data['IsInvoiced'] = this.isInvoiced;
data['IsInvoicedDesc'] = this.isInvoicedDesc;
return data;
}
}

@ -25,6 +25,8 @@ class LabViewModel extends ChangeNotifier {
bool isGraphVisible = true; bool isGraphVisible = true;
bool shouldShowGraph = true; bool shouldShowGraph = true;
bool isLabNeedToLoad = true;
LabRepo labRepo; LabRepo labRepo;
ErrorHandlerService errorHandlerService; ErrorHandlerService errorHandlerService;
NavigationService navigationService; NavigationService navigationService;
@ -33,6 +35,7 @@ class LabViewModel extends ChangeNotifier {
List<PatientLabOrdersResponseModel> filteredLabOrders = []; List<PatientLabOrdersResponseModel> filteredLabOrders = [];
List<PatientLabOrdersResponseModel> tempLabOrdersList = []; List<PatientLabOrdersResponseModel> tempLabOrdersList = [];
String labSpecialResult = ""; String labSpecialResult = "";
List<String> labOrderTests = [];
PatientLabOrdersResponseModel? currentlySelectedPatientOrder; PatientLabOrdersResponseModel? currentlySelectedPatientOrder;
@ -71,17 +74,29 @@ class LabViewModel extends ChangeNotifier {
required this.navigationService}); required this.navigationService});
initLabProvider() { initLabProvider() {
if (isLabNeedToLoad) {
patientLabOrders.clear(); patientLabOrders.clear();
filteredLabOrders.clear(); filteredLabOrders.clear();
labOrderTests.clear();
isLabOrdersLoading = true; isLabOrdersLoading = true;
isLabResultsLoading = true; isLabResultsLoading = true;
getPatientLabOrders(); getPatientLabOrders();
}
notifyListeners();
}
setIsLabNeedToLoad(bool value) {
isLabNeedToLoad = value;
notifyListeners(); notifyListeners();
} }
Future<void> getPatientLabOrders({Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getPatientLabOrders({Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isLabNeedToLoad) return;
isLabOrdersLoading = true;
patientLabOrders.clear(); patientLabOrders.clear();
uniqueTests.clear(); uniqueTests.clear();
labOrderTests.clear();
uniqueTests = {}; uniqueTests = {};
notifyListeners(); notifyListeners();
@ -105,6 +120,7 @@ class LabViewModel extends ChangeNotifier {
isLabResultsLoading = false; isLabResultsLoading = false;
filterSuggestions(); filterSuggestions();
getUniqueTestDescription(); getUniqueTestDescription();
isLabNeedToLoad = false;
notifyListeners(); notifyListeners();
if (onSuccess != null) { if (onSuccess != null) {
onSuccess(apiResponse); onSuccess(apiResponse);
@ -151,6 +167,9 @@ class LabViewModel extends ChangeNotifier {
createdOn: item.createdOn, createdOn: item.createdOn,
model: item)) model: item))
}; };
for (var element in uniqueTests) {
labOrderTests.add(element.description ?? "");
}
} }
Future<void> getPatientLabResultByHospital( Future<void> getPatientLabResultByHospital(
@ -165,6 +184,7 @@ class LabViewModel extends ChangeNotifier {
result.fold( result.fold(
(failure) async { (failure) async {
isLabResultByHospitalLoading = false; isLabResultByHospitalLoading = false;
notifyListeners();
// await errorHandlerService.handleError(failure: failure); // await errorHandlerService.handleError(failure: failure);
}, },
(apiResponse) { (apiResponse) {

@ -92,6 +92,9 @@ class MyAppointmentsViewModel extends ChangeNotifier {
} }
setIsAppointmentDataToBeLoaded(bool val) { setIsAppointmentDataToBeLoaded(bool val) {
if (val) {
isMyAppointmentsLoading = true;
}
isAppointmentDataToBeLoaded = val; isAppointmentDataToBeLoaded = val;
notifyListeners(); notifyListeners();
} }
@ -112,9 +115,11 @@ class MyAppointmentsViewModel extends ChangeNotifier {
Future<void> getPatientAppointments(bool isActiveAppointment, bool isArrivedAppointments, {Function(dynamic)? onSuccess, Function(String)? onError}) async { Future<void> getPatientAppointments(bool isActiveAppointment, bool isArrivedAppointments, {Function(dynamic)? onSuccess, Function(String)? onError}) async {
if (!isAppointmentDataToBeLoaded) return; if (!isAppointmentDataToBeLoaded) return;
filteredAppointmentList.clear();
patientAppointmentsHistoryList.clear(); patientAppointmentsHistoryList.clear();
patientUpcomingAppointmentsHistoryList.clear(); patientUpcomingAppointmentsHistoryList.clear();
patientArrivedAppointmentsHistoryList.clear(); patientArrivedAppointmentsHistoryList.clear();
notifyListeners();
final result = await myAppointmentsRepo.getPatientAppointments(isActiveAppointment: isActiveAppointment, isArrivedAppointments: isArrivedAppointments); final result = await myAppointmentsRepo.getPatientAppointments(isActiveAppointment: isActiveAppointment, isArrivedAppointments: isArrivedAppointments);
final resultArrived = await myAppointmentsRepo.getPatientAppointments(isActiveAppointment: false, isArrivedAppointments: true); final resultArrived = await myAppointmentsRepo.getPatientAppointments(isActiveAppointment: false, isArrivedAppointments: true);

@ -313,7 +313,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
), ),
SizedBox(width: 68.h), SizedBox(width: 68.h),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,

@ -117,7 +117,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
SizedBox(width: 8.h), SizedBox(width: 8.h),
const Spacer(), const Spacer(),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,
@ -159,7 +159,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
SizedBox(width: 8.h), SizedBox(width: 8.h),
const Spacer(), const Spacer(),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,
@ -196,7 +196,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
SizedBox(width: 8.h), SizedBox(width: 8.h),
const Spacer(), const Spacer(),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,

@ -8,6 +8,7 @@ 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/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/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/appointemnet_filters.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/appointemnet_filters.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';
@ -37,6 +38,7 @@ class MyAppointmentsPage extends StatefulWidget {
class _MyAppointmentsPageState extends State<MyAppointmentsPage> { class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
late MyAppointmentsViewModel myAppointmentsViewModel; late MyAppointmentsViewModel myAppointmentsViewModel;
late BookAppointmentsViewModel bookAppointmentsViewModel;
@override @override
void initState() { void initState() {
@ -50,6 +52,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
myAppointmentsViewModel = Provider.of<MyAppointmentsViewModel>(context, listen: false); myAppointmentsViewModel = Provider.of<MyAppointmentsViewModel>(context, listen: false);
bookAppointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false);
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView( body: CollapsingListView(
@ -92,7 +95,6 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Visibility( Visibility(
visible: myAppointmentsVM.availableFilters.isNotEmpty, visible: myAppointmentsVM.availableFilters.isNotEmpty,
child: getAppointmentFilters(myAppointmentsVM)), child: getAppointmentFilters(myAppointmentsVM)),
@ -117,6 +119,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel:
PatientAppointmentHistoryResponseModel(), PatientAppointmentHistoryResponseModel(),
myAppointmentsViewModel: myAppointmentsViewModel, myAppointmentsViewModel: myAppointmentsViewModel,
bookAppointmentsViewModel: bookAppointmentsViewModel,
isLoading: true, isLoading: true,
isFromHomePage: false, isFromHomePage: false,
), ),
@ -141,6 +144,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
filteredAppointmentList[index], filteredAppointmentList[index],
myAppointmentsViewModel: myAppointmentsViewModel:
myAppointmentsViewModel, myAppointmentsViewModel,
bookAppointmentsViewModel: bookAppointmentsViewModel,
isLoading: false, isLoading: false,
isFromHomePage: false, isFromHomePage: false,
), ),

@ -61,7 +61,7 @@ class MyDoctorsPage extends StatelessWidget {
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png",
width: 63.h, width: 63.h,
height: 63.h, height: 63.h,
fit: BoxFit.fill, fit: BoxFit.cover,
).circle(100).toShimmer2(isShow: true), ).circle(100).toShimmer2(isShow: true),
SizedBox(width: 16.h), SizedBox(width: 16.h),
Expanded( Expanded(
@ -112,7 +112,7 @@ class MyDoctorsPage extends StatelessWidget {
myAppointmentsVM.patientMyDoctorsList[index].doctorImageURL!, myAppointmentsVM.patientMyDoctorsList[index].doctorImageURL!,
width: 63.h, width: 63.h,
height: 63.h, height: 63.h,
fit: BoxFit.fill, fit: BoxFit.cover,
).circle(100).toShimmer2(isShow: false), ).circle(100).toShimmer2(isShow: false),
SizedBox(width: 16.h), SizedBox(width: 16.h),
Expanded( Expanded(
@ -140,7 +140,7 @@ class MyDoctorsPage extends StatelessWidget {
children: [ children: [
"".toText16(), "".toText16(),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, width: 15.h, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor)), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, width: 15.h, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor)),
], ],
), ),

@ -36,8 +36,8 @@ class AppointmentFilters extends StatelessWidget {
padding: EdgeInsets.symmetric(vertical: 12.h, horizontal: 8.h), padding: EdgeInsets.symmetric(vertical: 12.h, horizontal: 8.h),
deleteIconSize: Size(18.h, 18.h), deleteIconSize: Size(18.h, 18.h),
shape: SmoothRectangleBorder( shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(10 ), borderRadius: BorderRadius.circular(10.h),
smoothness: 10, smoothness: 10.h,
side: BorderSide( side: BorderSide(
color: selectedFilter?.contains(item) == true color: selectedFilter?.contains(item) == true
? AppColors.chipPrimaryRedBorderColor ? AppColors.chipPrimaryRedBorderColor

@ -8,15 +8,20 @@ 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/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/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/doctors_list_response_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/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';
import 'package:hmg_patient_app_new/features/my_appointments/utils/appointment_type.dart'; import 'package:hmg_patient_app_new/features/my_appointments/utils/appointment_type.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/appointments/appointment_details_page.dart'; import 'package:hmg_patient_app_new/presentation/appointments/appointment_details_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.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/app_custom_chip_widget.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.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/transitions/fade_page.dart'; import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
import 'package:smooth_corner/smooth_corner.dart'; import 'package:smooth_corner/smooth_corner.dart';
@ -26,6 +31,7 @@ class AppointmentCard extends StatefulWidget {
{super.key, {super.key,
required this.patientAppointmentHistoryResponseModel, required this.patientAppointmentHistoryResponseModel,
required this.myAppointmentsViewModel, required this.myAppointmentsViewModel,
required this.bookAppointmentsViewModel,
this.isLoading = false, this.isLoading = false,
this.isFromHomePage = false, this.isFromHomePage = false,
this.isFromMedicalReport = false, this.isFromMedicalReport = false,
@ -37,6 +43,7 @@ class AppointmentCard extends StatefulWidget {
bool isFromHomePage; bool isFromHomePage;
bool isFromMedicalReport; bool isFromMedicalReport;
MedicalFileViewModel? medicalFileViewModel; MedicalFileViewModel? medicalFileViewModel;
BookAppointmentsViewModel bookAppointmentsViewModel;
@override @override
State<AppointmentCard> createState() => _AppointmentCardState(); State<AppointmentCard> createState() => _AppointmentCardState();
@ -140,7 +147,7 @@ class _AppointmentCardState extends State<AppointmentCard> {
widget.isLoading ? "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png" : widget.patientAppointmentHistoryResponseModel.doctorImageURL!, widget.isLoading ? "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png" : widget.patientAppointmentHistoryResponseModel.doctorImageURL!,
width: 63.h, width: 63.h,
height: 63.h, height: 63.h,
fit: BoxFit.fill, fit: BoxFit.cover,
).circle(100).toShimmer2(isShow: widget.isLoading), ).circle(100).toShimmer2(isShow: widget.isLoading),
SizedBox(width: 16.h), SizedBox(width: 16.h),
Expanded( Expanded(
@ -244,7 +251,7 @@ class _AppointmentCardState extends State<AppointmentCard> {
borderRadius: 10.h, borderRadius: 10.h,
), ),
child: Transform.flip( child: Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.whiteColor, iconColor: AppColors.whiteColor,
@ -293,7 +300,9 @@ class _AppointmentCardState extends State<AppointmentCard> {
) )
: CustomButton( : CustomButton(
text: "Rebook with same doctor".needTranslation, text: "Rebook with same doctor".needTranslation,
onPressed: () {}, onPressed: () {
openDoctorScheduleCalendar();
},
backgroundColor: AppColors.greyColor, backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor, borderColor: AppColors.greyColor,
textColor: AppColors.blackColor, textColor: AppColors.blackColor,
@ -308,5 +317,45 @@ class _AppointmentCardState extends State<AppointmentCard> {
); );
} }
openDoctorScheduleCalendar() async {
DoctorsListResponseModel doctor = DoctorsListResponseModel(
clinicID: widget.patientAppointmentHistoryResponseModel.clinicID,
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
doctorID: widget.patientAppointmentHistoryResponseModel.doctorID,
doctorImageURL: widget.patientAppointmentHistoryResponseModel.doctorImageURL,
doctorTitle: widget.patientAppointmentHistoryResponseModel.doctorTitle,
name: widget.patientAppointmentHistoryResponseModel.doctorNameObj,
nationalityFlagURL: "https://hmgwebservices.com/Images/flag/SYR.png",
speciality: [],
clinicName: widget.patientAppointmentHistoryResponseModel.clinicName,
projectName: widget.patientAppointmentHistoryResponseModel.projectName,
);
widget.bookAppointmentsViewModel.setSelectedDoctor(doctor);
LoaderBottomSheet.showLoader();
await widget.bookAppointmentsViewModel.getDoctorFreeSlots(
isBookingForLiveCare: false,
onSuccess: (dynamic respData) async {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
title: "Pick a Date".needTranslation,
context,
child: AppointmentCalendar(),
isFullScreen: false,
isCloseButtonVisible: true,
callBackFunc: () {},
);
},
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
});
}
void performAppointmentNextAction(nextAction) {} void performAppointmentNextAction(nextAction) {}
} }

@ -122,7 +122,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
), ),
), ),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,

@ -40,7 +40,7 @@ class AppointmentDoctorCard extends StatelessWidget {
patientAppointmentHistoryResponseModel.doctorImageURL!, patientAppointmentHistoryResponseModel.doctorImageURL!,
width: 63.h, width: 63.h,
height: 63.h, height: 63.h,
fit: BoxFit.fill, fit: BoxFit.cover,
).circle(100), ).circle(100),
SizedBox(width: 16.h), SizedBox(width: 16.h),
Expanded( Expanded(

@ -46,7 +46,7 @@ class FacilitySelectionItem extends StatelessWidget {
children: [ children: [
info, info,
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,

@ -39,7 +39,7 @@ class HospitalListItem extends StatelessWidget {
), ),
), ),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,

@ -43,7 +43,7 @@ class RegionListItem extends StatelessWidget {
], ],
), ),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,

@ -130,7 +130,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
], ],
), ),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)), flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)),
], ],
).onPress(() { ).onPress(() {
bookAppointmentsViewModel.setIsClinicsListLoading(true); bookAppointmentsViewModel.setIsClinicsListLoading(true);
@ -163,7 +163,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
], ],
), ),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)), flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)),
], ],
).onPress(() { ).onPress(() {
bookAppointmentsViewModel.setIsDoctorSearchByNameStarted(false); bookAppointmentsViewModel.setIsDoctorSearchByNameStarted(false);
@ -194,7 +194,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
], ],
), ),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)), flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)),
], ],
).onPress(() { ).onPress(() {
bookAppointmentsViewModel.setProjectID(null); bookAppointmentsViewModel.setProjectID(null);
@ -239,7 +239,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
], ],
), ),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)), flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)),
], ],
).onPress(() async { ).onPress(() async {
//TODO Implement API to check for existing LiveCare Requests //TODO Implement API to check for existing LiveCare Requests
@ -282,7 +282,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
], ],
), ),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)), flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)),
], ],
).onPress(() { ).onPress(() {
bookAppointmentsViewModel.setIsClinicsListLoading(true); bookAppointmentsViewModel.setIsClinicsListLoading(true);
@ -313,7 +313,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
], ],
), ),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)), flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)),
], ],
).onPress(() { ).onPress(() {
openRegionListBottomSheet(context, RegionBottomSheetType.FOR_REGION); openRegionListBottomSheet(context, RegionBottomSheetType.FOR_REGION);

@ -53,7 +53,7 @@ class DoctorProfilePage extends StatelessWidget {
bookAppointmentsViewModel.doctorsProfileResponseModel.doctorImageURL!, bookAppointmentsViewModel.doctorsProfileResponseModel.doctorImageURL!,
width: 63.h, width: 63.h,
height: 63.h, height: 63.h,
fit: BoxFit.fill, fit: BoxFit.cover,
).circle(100), ).circle(100),
SizedBox(width: 8.h), SizedBox(width: 8.h),
Column( Column(
@ -73,7 +73,7 @@ class DoctorProfilePage extends StatelessWidget {
bookAppointmentsViewModel.doctorsProfileResponseModel.nationalityFlagURL!, bookAppointmentsViewModel.doctorsProfileResponseModel.nationalityFlagURL!,
width: 32.h, width: 32.h,
height: 32.h, height: 32.h,
fit: BoxFit.fill, fit: BoxFit.cover,
), ),
], ],
), ),

@ -115,7 +115,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
SizedBox(width: 8.h), SizedBox(width: 8.h),
const Spacer(), const Spacer(),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,
@ -157,7 +157,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
SizedBox(width: 8.h), SizedBox(width: 8.h),
const Spacer(), const Spacer(),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,
@ -194,7 +194,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
SizedBox(width: 8.h), SizedBox(width: 8.h),
const Spacer(), const Spacer(),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,

@ -57,7 +57,7 @@ class LiveCareClinicCard extends StatelessWidget {
.toText16(isBold: true) .toText16(isBold: true)
.toShimmer2(isShow: isLoading)), .toShimmer2(isShow: isLoading)),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, width: 40.h, height: 40.h, fit: BoxFit.contain, iconColor: AppColors.textColor).toShimmer2(isShow: isLoading)), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, width: 40.h, height: 40.h, fit: BoxFit.contain, iconColor: AppColors.textColor).toShimmer2(isShow: isLoading)),
]), ]),
], ],

@ -71,7 +71,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
bookAppointmentsViewModel.selectedDoctor.doctorImageURL!, bookAppointmentsViewModel.selectedDoctor.doctorImageURL!,
width: 50.h, width: 50.h,
height: 50.h, height: 50.h,
fit: BoxFit.fill, fit: BoxFit.cover,
).circle(100), ).circle(100),
SizedBox(width: 8.h), SizedBox(width: 8.h),
Column( Column(
@ -88,7 +88,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL!, bookAppointmentsViewModel.selectedDoctor.nationalityFlagURL!,
width: 20.h, width: 20.h,
height: 15.h, height: 15.h,
fit: BoxFit.fill, fit: BoxFit.cover,
), ),
], ],
), ),

@ -88,7 +88,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
SizedBox(width: 8.h), SizedBox(width: 8.h),
const Spacer(), const Spacer(),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,
@ -130,7 +130,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
SizedBox(width: 8.h), SizedBox(width: 8.h),
const Spacer(), const Spacer(),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,

@ -36,7 +36,7 @@ class HospitalListItemAdvancePayment extends StatelessWidget {
), ),
), ),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, icon: AppAssets.forward_arrow_icon,
iconColor: AppColors.blackColor, iconColor: AppColors.blackColor,

@ -15,6 +15,7 @@ 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/book_appointments/book_appointments_view_model.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/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';
@ -68,6 +69,7 @@ class _LandingPageState extends State<LandingPage> {
late InsuranceViewModel insuranceViewModel; late InsuranceViewModel insuranceViewModel;
late ImmediateLiveCareViewModel immediateLiveCareViewModel; late ImmediateLiveCareViewModel immediateLiveCareViewModel;
late BookAppointmentsViewModel bookAppointmentsViewModel;
final SwiperController _controller = SwiperController(); final SwiperController _controller = SwiperController();
@ -75,10 +77,10 @@ class _LandingPageState extends State<LandingPage> {
void initState() { void initState() {
authVM = context.read<AuthenticationViewModel>(); authVM = context.read<AuthenticationViewModel>();
habibWalletVM = context.read<HabibWalletViewModel>(); habibWalletVM = context.read<HabibWalletViewModel>();
myAppointmentsViewModel = context.read<MyAppointmentsViewModel>(); // myAppointmentsViewModel = context.read<MyAppointmentsViewModel>();
prescriptionsViewModel = context.read<PrescriptionsViewModel>(); // prescriptionsViewModel = context.read<PrescriptionsViewModel>();
insuranceViewModel = context.read<InsuranceViewModel>(); // insuranceViewModel = context.read<InsuranceViewModel>();
immediateLiveCareViewModel = context.read<ImmediateLiveCareViewModel>(); // immediateLiveCareViewModel = context.read<ImmediateLiveCareViewModel>();
authVM.savePushTokenToAppState(); authVM.savePushTokenToAppState();
if (mounted) { if (mounted) {
@ -104,6 +106,11 @@ class _LandingPageState extends State<LandingPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
bookAppointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false);
myAppointmentsViewModel = Provider.of<MyAppointmentsViewModel>(context, listen: false);
prescriptionsViewModel = Provider.of<PrescriptionsViewModel>(context, listen: false);
insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false);
immediateLiveCareViewModel = Provider.of<ImmediateLiveCareViewModel>(context, listen: false);
appState = getIt.get<AppState>(); appState = getIt.get<AppState>();
return Scaffold( return Scaffold(
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
@ -201,6 +208,7 @@ class _LandingPageState extends State<LandingPage> {
child: AppointmentCard( child: AppointmentCard(
patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(), patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(),
myAppointmentsViewModel: myAppointmentsViewModel, myAppointmentsViewModel: myAppointmentsViewModel,
bookAppointmentsViewModel: bookAppointmentsViewModel,
isLoading: true, isLoading: true,
isFromHomePage: true, isFromHomePage: true,
), ),
@ -212,6 +220,7 @@ class _LandingPageState extends State<LandingPage> {
child: AppointmentCard( child: AppointmentCard(
patientAppointmentHistoryResponseModel: myAppointmentsVM.patientAppointmentsHistoryList.first, patientAppointmentHistoryResponseModel: myAppointmentsVM.patientAppointmentsHistoryList.first,
myAppointmentsViewModel: myAppointmentsViewModel, myAppointmentsViewModel: myAppointmentsViewModel,
bookAppointmentsViewModel: bookAppointmentsViewModel,
isLoading: false, isLoading: false,
isFromHomePage: true, isFromHomePage: true,
), ),
@ -240,6 +249,7 @@ class _LandingPageState extends State<LandingPage> {
child: AppointmentCard( child: AppointmentCard(
patientAppointmentHistoryResponseModel: myAppointmentsVM.patientAppointmentsHistoryList[index], patientAppointmentHistoryResponseModel: myAppointmentsVM.patientAppointmentsHistoryList[index],
myAppointmentsViewModel: myAppointmentsViewModel, myAppointmentsViewModel: myAppointmentsViewModel,
bookAppointmentsViewModel: bookAppointmentsViewModel,
isLoading: false, isLoading: false,
isFromHomePage: true, isFromHomePage: true,
), ),

@ -0,0 +1,109 @@
import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/app_state.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/utils.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/insurance/insurance_view_model.dart';
import 'package:hmg_patient_app_new/features/insurance/models/resp_models/patient_insurance_approval_response_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/insurance/widgets/insurance_approval_card.dart';
import 'package:hmg_patient_app_new/presentation/insurance/widgets/insurance_approval_details_page.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/routes/custom_page_route.dart';
import 'package:provider/provider.dart';
class InsuranceApprovalsPage extends StatefulWidget {
const InsuranceApprovalsPage({super.key});
@override
State<InsuranceApprovalsPage> createState() => _InsuranceApprovalsPageState();
}
class _InsuranceApprovalsPageState extends State<InsuranceApprovalsPage> {
late InsuranceViewModel insuranceViewModel;
late AppState appState;
@override
void initState() {
scheduleMicrotask(() {
insuranceViewModel.setIsInsuranceApprovalsLoading(true);
insuranceViewModel.getPatientInsuranceApprovalsList();
});
super.initState();
}
@override
Widget build(BuildContext context) {
appState = getIt.get<AppState>();
insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false);
return CollapsingListView(
title: "${LocaleKeys.insurance.tr(context: context)} ${LocaleKeys.approvals.tr(context: context)}",
child: SingleChildScrollView(
child: Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ListView.separated(
padding: EdgeInsets.only(top: 24.h),
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: insuranceVM.isInsuranceApprovalsLoading
? 5
: insuranceVM.patientInsuranceApprovalsList.isNotEmpty
? insuranceVM.patientInsuranceApprovalsList.length
: 1,
itemBuilder: (context, index) {
return insuranceVM.isInsuranceApprovalsLoading
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
child: InsuranceApprovalCard(
insuranceApprovalResponseModel: InsuranceApprovalResponseModel(),
appState: appState,
isLoading: true,
),
).paddingSymmetrical(24.h, 0.h)
: insuranceVM.patientInsuranceApprovalsList.isNotEmpty
? AnimationConfiguration.staggeredList(
position: index,
duration: const Duration(milliseconds: 500),
child: SlideAnimation(
verticalOffset: 100.0,
child: FadeInAnimation(
child: AnimatedContainer(
duration: Duration(milliseconds: 300),
curve: Curves.easeInOut,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.h, hasShadow: true),
child: InsuranceApprovalCard(
insuranceApprovalResponseModel: insuranceVM.patientInsuranceApprovalsList[index],
appState: appState,
isLoading: false,
).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: InsuranceApprovalDetailsPage(insuranceApprovalResponseModel: insuranceVM.patientInsuranceApprovalsList[index]),
),
);
}),
).paddingSymmetrical(24.h, 0.h),
),
),
)
: Utils.getNoDataWidget(context, noDataText: "You don't have any insurance approvals yet.".needTranslation);
},
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
),
SizedBox(height: 24.h),
],
);
}),
),
);
}
}

@ -34,7 +34,6 @@ class InsuranceHomePage extends StatefulWidget {
class _InsuranceHomePageState extends State<InsuranceHomePage> { class _InsuranceHomePageState extends State<InsuranceHomePage> {
late InsuranceViewModel insuranceViewModel; late InsuranceViewModel insuranceViewModel;
late AppState appState; late AppState appState;
@override @override

@ -0,0 +1,129 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.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/utils.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/insurance/models/resp_models/patient_insurance_approval_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/utils/appointment_type.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/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
class InsuranceApprovalCard extends StatelessWidget {
InsuranceApprovalCard({super.key, required this.insuranceApprovalResponseModel, required this.isLoading, required this.appState});
InsuranceApprovalResponseModel insuranceApprovalResponseModel;
AppState appState;
bool isLoading;
@override
Widget build(BuildContext context) {
return Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: true,
),
child: Padding(
padding: EdgeInsets.all(14.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Wrap(
alignment: WrapAlignment.start,
direction: Axis.horizontal,
spacing: 6.h,
runSpacing: 6.h,
children: [
AppCustomChipWidget(
labelText: isLoading ? "Approved" : insuranceApprovalResponseModel.approvalStatusDescption,
backgroundColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor.withOpacity(0.1) : AppColors.primaryRedColor.withOpacity(0.1),
textColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor : AppColors.primaryRedColor,
).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
icon: isLoading ? AppAssets.walkin_appointment_icon : (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppAssets.walkin_appointment_icon : AppAssets.small_livecare_icon),
iconColor: isLoading
? AppColors.textColor
: !insuranceApprovalResponseModel.isLiveCareAppointment!
? AppColors.textColor
: AppColors.whiteColor,
labelText: isLoading
? "Walk In"
: insuranceApprovalResponseModel.isLiveCareAppointment!
? LocaleKeys.livecare.tr(context: context)
: "Walk In".needTranslation,
backgroundColor: isLoading ? AppColors.greyColor : (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor),
textColor: isLoading ? AppColors.textColor : (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor),
).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
labelText: isLoading
? "OutPatient"
: appState.isArabic()
? insuranceApprovalResponseModel.isInOutPatientDescriptionN!
: insuranceApprovalResponseModel.isInOutPatientDescription!,
backgroundColor: AppColors.primaryRedColor.withOpacity(0.1),
textColor: AppColors.primaryRedColor,
).toShimmer2(isShow: isLoading),
],
).toShimmer2(isShow: isLoading),
SizedBox(height: 16.h),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.network(
isLoading ? "https://hmgwebservices.com/Images/MobileImages/OALAY/1439.png" : insuranceApprovalResponseModel.doctorImageURL!,
width: 63.h,
height: 63.h,
fit: BoxFit.cover,
).circle(100).toShimmer2(isShow: isLoading),
SizedBox(width: 16.h),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(isLoading ? "John Smith" : insuranceApprovalResponseModel.doctorName!).toText16(isBold: true).toShimmer2(isShow: isLoading),
Wrap(
direction: Axis.horizontal,
spacing: 3.h,
runSpacing: 4.h,
children: [
// AppCustomChipWidget(labelText: isLoading ? "Approved" : insuranceApprovalResponseModel.approvalStatusDescption!,
// backgroundColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor.withValues(alpha: 0.1) : AppColors.primaryRedColor.withValues(alpha: 0.1),
// textColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor : AppColors.primaryRedColor,
// ).toShimmer2(isShow: isLoading),
AppCustomChipWidget(labelText: isLoading ? "Cardiology" : insuranceApprovalResponseModel.clinicName!).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
icon: AppAssets.doctor_calendar_icon,
labelText: isLoading ? "Cardiology" : DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.submitOn), false))
.toShimmer2(isShow: isLoading),
isLoading
? SizedBox.shrink()
: AppCustomChipWidget(
labelText: isLoading ? LocaleKeys.approvalNo.tr(context: context) : "${LocaleKeys.approvalNo.tr(context: context)} ${insuranceApprovalResponseModel.approvalNo}")
.toShimmer2(isShow: isLoading),
],
),
],
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Transform.flip(
flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon_small, width: 15.h, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor)),
],
),
],
),
),
);
}
}

@ -0,0 +1,135 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/app_state.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/extensions/string_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/features/insurance/models/resp_models/patient_insurance_approval_response_model.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/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:provider/provider.dart';
class InsuranceApprovalDetailsPage extends StatelessWidget {
InsuranceApprovalDetailsPage({super.key, required this.insuranceApprovalResponseModel});
InsuranceApprovalResponseModel insuranceApprovalResponseModel;
late InsuranceViewModel insuranceViewModel;
late AppState appState;
@override
Widget build(BuildContext context) {
appState = getIt.get<AppState>();
insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false);
return CollapsingListView(
title: "${LocaleKeys.insurance.tr(context: context)} ${LocaleKeys.approvals.tr(context: context)}",
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.h,
hasShadow: true,
),
child: Padding(
padding: EdgeInsets.all(14.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Wrap(
alignment: WrapAlignment.start,
direction: Axis.horizontal,
spacing: 6.h,
runSpacing: 6.h,
children: [
AppCustomChipWidget(
labelText: insuranceApprovalResponseModel.approvalStatusDescption,
backgroundColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor.withOpacity(0.1) : AppColors.primaryRedColor.withOpacity(0.1),
textColor: insuranceApprovalResponseModel.status == 9 ? AppColors.successColor : AppColors.primaryRedColor,
),
AppCustomChipWidget(
icon: (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppAssets.walkin_appointment_icon : AppAssets.small_livecare_icon),
iconColor: !insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor,
labelText: insuranceApprovalResponseModel.isLiveCareAppointment! ? LocaleKeys.livecare.tr(context: context) : "Walk In".needTranslation,
backgroundColor: (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor),
textColor: (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor),
),
AppCustomChipWidget(
labelText: appState.isArabic() ? insuranceApprovalResponseModel.isInOutPatientDescriptionN! : insuranceApprovalResponseModel.isInOutPatientDescription!,
backgroundColor: AppColors.primaryRedColor.withOpacity(0.1),
textColor: AppColors.primaryRedColor,
),
],
),
SizedBox(height: 16.h),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.network(
insuranceApprovalResponseModel.doctorImageURL!,
width: 63.h,
height: 63.h,
fit: BoxFit.cover,
).circle(100),
SizedBox(width: 16.h),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(insuranceApprovalResponseModel.doctorName!).toText16(isBold: true),
Wrap(
direction: Axis.horizontal,
spacing: 3.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(labelText: insuranceApprovalResponseModel.clinicName!),
AppCustomChipWidget(labelText: "${LocaleKeys.approvalNo.tr(context: context)} ${insuranceApprovalResponseModel.approvalNo}"),
AppCustomChipWidget(labelText: "${LocaleKeys.unusedCount.tr(context: context)} ${insuranceApprovalResponseModel.unUsedCount}"),
AppCustomChipWidget(labelText: "${LocaleKeys.companyName.tr(context: context)} ${insuranceApprovalResponseModel.companyName}"),
AppCustomChipWidget(
labelText:
"${LocaleKeys.receiptOn.tr(context: context)} ${DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.receiptOn), false)}"),
AppCustomChipWidget(
labelText:
"${LocaleKeys.expiryOn.tr(context: context)} ${DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceApprovalResponseModel.expiryDate), false)}"),
],
),
],
),
),
],
),
],
),
),
),
SizedBox(height: 16.h),
Container(
width: double.infinity,
height: 200.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.h,
hasShadow: true,
),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Approval Details".toText16(isBold: true),
],
),
),
)
],
).paddingSymmetrical(24.h, 24.h),
);
}
}

@ -8,7 +8,6 @@ import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/app_state.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/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/request_utils.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/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
@ -16,6 +15,7 @@ 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/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/doctors_list_response_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/doctors_list_response_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/lab/lab_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/medical_file/models/patient_sickleave_response_model.dart'; import 'package:hmg_patient_app_new/features/medical_file/models/patient_sickleave_response_model.dart';
@ -27,11 +27,15 @@ import 'package:hmg_patient_app_new/presentation/appointments/my_appointments_pa
import 'package:hmg_patient_app_new/presentation/appointments/my_doctors_page.dart'; import 'package:hmg_patient_app_new/presentation/appointments/my_doctors_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointment_page.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointment_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart';
import 'package:hmg_patient_app_new/presentation/insurance/insurance_approvals_page.dart';
import 'package:hmg_patient_app_new/presentation/insurance/insurance_home_page.dart'; import 'package:hmg_patient_app_new/presentation/insurance/insurance_home_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';
import 'package:hmg_patient_app_new/presentation/insurance/widgets/patient_insurance_card.dart'; import 'package:hmg_patient_app_new/presentation/insurance/widgets/patient_insurance_card.dart';
import 'package:hmg_patient_app_new/presentation/lab/lab_orders_page.dart';
import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart'; import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart';
import 'package:hmg_patient_app_new/presentation/my_family/my_family.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/presentation/radiology/radiology_orders_page.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';
import 'package:hmg_patient_app_new/presentation/medical_report/medical_reports_page.dart'; import 'package:hmg_patient_app_new/presentation/medical_report/medical_reports_page.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/patient_sickleaves_list_page.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/patient_sickleaves_list_page.dart';
@ -39,8 +43,6 @@ import 'package:hmg_patient_app_new/presentation/medical_file/vaccine_list_page.
import 'package:hmg_patient_app_new/presentation/medical_file/widgets/lab_rad_card.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/widgets/lab_rad_card.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/widgets/medical_file_card.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/widgets/medical_file_card.dart';
import 'package:hmg_patient_app_new/presentation/medical_file/widgets/patient_sick_leave_card.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/widgets/patient_sick_leave_card.dart';
import 'package:hmg_patient_app_new/presentation/my_family/my_family.dart';
import 'package:hmg_patient_app_new/presentation/my_family/widget/my_family_sheet.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_page.dart'; import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_page.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';
@ -70,6 +72,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
late MyAppointmentsViewModel myAppointmentsViewModel; late MyAppointmentsViewModel myAppointmentsViewModel;
late MedicalFileViewModel medicalFileViewModel; late MedicalFileViewModel medicalFileViewModel;
late BookAppointmentsViewModel bookAppointmentsViewModel; late BookAppointmentsViewModel bookAppointmentsViewModel;
late LabViewModel labViewModel;
int currentIndex = 0; int currentIndex = 0;
@ -78,14 +81,10 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
appState = getIt.get<AppState>(); appState = getIt.get<AppState>();
scheduleMicrotask(() { scheduleMicrotask(() {
if (appState.isAuthenticated) { if (appState.isAuthenticated) {
labViewModel.initLabProvider();
insuranceViewModel.initInsuranceProvider(); insuranceViewModel.initInsuranceProvider();
medicalFileViewModel.setIsPatientSickLeaveListLoading(true); medicalFileViewModel.setIsPatientSickLeaveListLoading(true);
medicalFileViewModel.getPatientSickLeaveList(); medicalFileViewModel.getPatientSickLeaveList();
// if (appState.getSuperUserID == null) {
// medicalFileViewModel.getFamilyFiles(status: 0); //TODO: Remove status: 1 by Aamir Need to Discuss With Sultan
// medicalFileViewModel.getAllPendingRecordsByResponseId(); //TODO: Added By Aamir
// }
medicalFileViewModel.onTabChanged(0); medicalFileViewModel.onTabChanged(0);
} }
}); });
@ -94,6 +93,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
labViewModel = Provider.of<LabViewModel>(context, listen: false);
insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false); insuranceViewModel = Provider.of<InsuranceViewModel>(context, listen: false);
myAppointmentsViewModel = Provider.of<MyAppointmentsViewModel>(context, listen: false); myAppointmentsViewModel = Provider.of<MyAppointmentsViewModel>(context, listen: false);
medicalFileViewModel = Provider.of<MedicalFileViewModel>(context, listen: false); medicalFileViewModel = Provider.of<MedicalFileViewModel>(context, listen: false);
@ -214,8 +214,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
return Column( return Column(
children: [ children: [
CustomTabBar( CustomTabBar(
activeTextColor: Color(0xffED1C2B), activeTextColor: AppColors.primaryRedColor,
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1), activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
tabs: [ tabs: [
CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation), CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation),
CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)), CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)),
@ -390,16 +390,32 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
child: LabRadCard( child: LabRadCard(
icon: AppAssets.lab_result_icon, icon: AppAssets.lab_result_icon,
labelText: LocaleKeys.labResults.tr(context: context), labelText: LocaleKeys.labResults.tr(context: context),
labOrderTests: ["Complete blood count", "Creatinine", "Blood Sugar"], // labOrderTests: ["Complete blood count", "Creatinine", "Blood Sugar"],
labOrderTests: labViewModel.isLabOrdersLoading ? [] : labViewModel.labOrderTests,
isLoading: labViewModel.isLabOrdersLoading,
).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: LabOrdersPage(),
), ),
);
}),
), ),
SizedBox(width: 16.h), SizedBox(width: 16.h),
Expanded( Expanded(
child: LabRadCard( child: LabRadCard(
icon: AppAssets.radiology_icon, icon: AppAssets.radiology_icon,
labelText: LocaleKeys.radiology.tr(context: context), labelText: LocaleKeys.radiology.tr(context: context),
labOrderTests: ["Chest X-ray", "Abdominal Ultrasound", "Dental X-ray"], // labOrderTests: ["Chest X-ray", "Abdominal Ultrasound", "Dental X-ray"],
labOrderTests: [],
isLoading: false,
).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: RadiologyOrdersPage(),
), ),
);
}),
), ),
], ],
).paddingSymmetrical(24.h, 0.h), ).paddingSymmetrical(24.h, 0.h),
@ -437,7 +453,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
prescriptionVM.patientPrescriptionOrders[index].doctorImageURL!, prescriptionVM.patientPrescriptionOrders[index].doctorImageURL!,
width: 40.h, width: 40.h,
height: 40.h, height: 40.h,
fit: BoxFit.fill, fit: BoxFit.cover,
).circle(100), ).circle(100),
SizedBox(width: 16.h), SizedBox(width: 16.h),
Expanded( Expanded(
@ -463,8 +479,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
), ),
// SizedBox(width: 40.h), // SizedBox(width: 40.h),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, width: 15.h, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor)), child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, width: 15.h, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor)),
], ],
).onPress(() { ).onPress(() {
prescriptionVM.setPrescriptionsDetailsLoading(); prescriptionVM.setPrescriptionsDetailsLoading();
@ -498,7 +515,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
backgroundColor: AppColors.secondaryLightRedColor, backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor, textColor: AppColors.primaryRedColor,
fontSize: 13, fontSize: 12.3,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
borderRadius: 12.h, borderRadius: 12.h,
height: 40.h, height: 40.h,
@ -534,7 +551,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 20.h, borderRadius: 20.h,
hasShadow: true, hasShadow: false,
), ),
child: Utils.getNoDataWidget(context, noDataText: "You don't have any prescriptions yet.".needTranslation, isSmallWidget: true, width: 62, height: 62)) child: Utils.getNoDataWidget(context, noDataText: "You don't have any prescriptions yet.".needTranslation, isSmallWidget: true, width: 62, height: 62))
.paddingSymmetrical(24.h, 0.h); .paddingSymmetrical(24.h, 0.h);
@ -630,7 +647,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 20.h, borderRadius: 20.h,
hasShadow: true, hasShadow: false,
), ),
child: Utils.getNoDataWidget(context, noDataText: "You don't have any completed visits yet.".needTranslation, isSmallWidget: true, width: 62, height: 62), child: Utils.getNoDataWidget(context, noDataText: "You don't have any completed visits yet.".needTranslation, isSmallWidget: true, width: 62, height: 62),
).paddingSymmetrical(24.h, 0.h); ).paddingSymmetrical(24.h, 0.h);
@ -711,7 +728,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration( decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor, color: AppColors.whiteColor,
borderRadius: 20.h, borderRadius: 20.h,
hasShadow: true, hasShadow: false,
), ),
child: Utils.getNoDataWidget( child: Utils.getNoDataWidget(
context, context,
@ -769,12 +786,18 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
); );
}), }),
MedicalFileCard( MedicalFileCard(
label: "Insurance Approvals".needTranslation, label: "${LocaleKeys.insurance.tr(context: context)} ${LocaleKeys.approvals.tr(context: context)}",
textColor: AppColors.blackColor, textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor, backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.eye_result_icon, svgIcon: AppAssets.eye_result_icon,
isLargeText: true, isLargeText: true,
iconSize: 36.h), iconSize: 36.h).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: InsuranceApprovalsPage(),
),
);
}),
MedicalFileCard( MedicalFileCard(
label: "My Invoices List".needTranslation, label: "My Invoices List".needTranslation,
textColor: AppColors.blackColor, textColor: AppColors.blackColor,
@ -809,13 +832,20 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
patientSickLeavesResponseModel: medicalFileVM.patientSickLeaveList.first, patientSickLeavesResponseModel: medicalFileVM.patientSickLeaveList.first,
isLoading: false, isLoading: false,
).paddingSymmetrical(24.h, 0.0) ).paddingSymmetrical(24.h, 0.0)
: Utils.getNoDataWidget( : Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,
hasShadow: false,
),
child: Utils.getNoDataWidget(
context, context,
noDataText: "You don't have any sick leaves yet.".needTranslation, noDataText: "You don't have any sick leaves yet.".needTranslation,
isSmallWidget: true, isSmallWidget: true,
width: 62, width: 62,
height: 62, height: 62,
); ),
).paddingSymmetrical(24.h, 0.h);
}), }),
SizedBox(height: 16.h), SizedBox(height: 16.h),
GridView( GridView(

@ -77,7 +77,7 @@ class _VaccineListPageState extends State<VaccineListPage> {
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png",
width: 63.h, width: 63.h,
height: 63.h, height: 63.h,
fit: BoxFit.fill, fit: BoxFit.cover,
).circle(100).toShimmer2(isShow: true), ).circle(100).toShimmer2(isShow: true),
SizedBox(width: 16.h), SizedBox(width: 16.h),
Expanded( Expanded(

@ -9,11 +9,12 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
class LabRadCard extends StatelessWidget { class LabRadCard extends StatelessWidget {
LabRadCard({super.key, required this.icon, required this.labelText, required this.labOrderTests}); LabRadCard({super.key, required this.icon, required this.labelText, required this.labOrderTests, required this.isLoading});
String icon; String icon;
String labelText; String labelText;
List<String> labOrderTests = []; List<String> labOrderTests = [];
bool isLoading;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -36,24 +37,26 @@ class LabRadCard extends StatelessWidget {
], ],
), ),
SizedBox(height: 16.h), SizedBox(height: 16.h),
ListView.separated( labOrderTests.isNotEmpty
? ListView.separated(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (cxt, index) { itemBuilder: (cxt, index) {
return labOrderTests[index].toText12(isBold: true, maxLine: 1).toShimmer2(isShow: false, radius: 6.h, height: 24.h, width: 120.h); return labOrderTests[index].toText12(isBold: true, maxLine: 1).toShimmer2(isShow: false, radius: 6.h, height: 24.h, width: 120.h).toShimmer2(isShow: isLoading);
}, },
separatorBuilder: (cxt, index) => SizedBox(height: 8.h), separatorBuilder: (cxt, index) => SizedBox(height: 8.h),
itemCount: labOrderTests.length, itemCount: 3,
), )
: "You don't have any records yet".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor, isCenter: true),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
SizedBox.shrink(), SizedBox.shrink(),
Transform.flip( Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon_small, width: 15.h, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor) child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon_small, width: 15.h, height: 15.h, fit: BoxFit.contain, iconColor: AppColors.textColor)
.toShimmer2(isShow: false, radius: 12.h), .toShimmer2(isShow: false, radius: 12.h),
), ),

@ -141,7 +141,7 @@ class PatientSickLeaveCard extends StatelessWidget {
child: Padding( child: Padding(
padding: EdgeInsets.all(10.h), padding: EdgeInsets.all(10.h),
child: Transform.flip( child: Transform.flip(
flipX: _appState.isArabic() ? true : false, flipX: _appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small, icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.whiteColor, iconColor: AppColors.whiteColor,

@ -3,6 +3,7 @@ import 'package:flutter_staggered_animations/flutter_staggered_animations.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/book_appointments/book_appointments_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/my_appointments/my_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart'; import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart';
@ -42,6 +43,7 @@ class MedicalReportRequestPage extends StatelessWidget {
child: AppointmentCard( child: AppointmentCard(
patientAppointmentHistoryResponseModel: medicalFileViewModel.patientMedicalReportAppointmentHistoryList[index], patientAppointmentHistoryResponseModel: medicalFileViewModel.patientMedicalReportAppointmentHistoryList[index],
myAppointmentsViewModel: Provider.of<MyAppointmentsViewModel>(context, listen: false), myAppointmentsViewModel: Provider.of<MyAppointmentsViewModel>(context, listen: false),
bookAppointmentsViewModel: Provider.of<BookAppointmentsViewModel>(context, listen: false),
medicalFileViewModel: medicalFileViewModel, medicalFileViewModel: medicalFileViewModel,
isLoading: false, isLoading: false,
isFromHomePage: false, isFromHomePage: false,

@ -74,7 +74,9 @@ class _FamilyMedicalScreenState extends State<FamilyMedicalScreen> {
}, },
icon: AppAssets.add_icon, icon: AppAssets.add_icon,
height: 56.h, height: 56.h,
fontWeight: FontWeight.w600)) fontSize: 16,
borderRadius: 12.h,
fontWeight: FontWeight.w500))
: SizedBox(), : SizedBox(),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

@ -111,7 +111,7 @@ class _FamilyCardsState extends State<FamilyCards> {
Wrap(alignment: WrapAlignment.start, crossAxisAlignment: WrapCrossAlignment.start, runAlignment: WrapAlignment.start, spacing: 0.h, children: [ Wrap(alignment: WrapAlignment.start, crossAxisAlignment: WrapCrossAlignment.start, runAlignment: WrapAlignment.start, spacing: 0.h, children: [
(profile.patientName ?? "").toText14(isBold: false, isCenter: false, maxlines: 1, weight: FontWeight.w600), (profile.patientName ?? "").toText14(isBold: false, isCenter: false, maxlines: 1, weight: FontWeight.w600),
(getStatusTextByRequest(FamilyFileEnum.values.firstWhere((e) => e.toInt == profile.status), profile.isRequestFromMySide ?? false)) (getStatusTextByRequest(FamilyFileEnum.values.firstWhere((e) => e.toInt == profile.status), profile.isRequestFromMySide ?? false))
.toText14(isBold: false, isCenter: false, maxlines: 1, weight: FontWeight.w500, color: AppColors.greyTextColor), .toText12(isBold: false, isCenter: false, maxLine: 1, fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
]), ]),
SizedBox(height: 8.h), SizedBox(height: 8.h),
CustomChipWidget( CustomChipWidget(

@ -264,9 +264,10 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
child: Padding( child: Padding(
padding: EdgeInsets.all(8.h), padding: EdgeInsets.all(8.h),
child: Transform.flip( child: Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets( child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon, icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.whiteColor,
width: 10.h, width: 10.h,
height: 10.h, height: 10.h,
fit: BoxFit.contain, fit: BoxFit.contain,

@ -81,7 +81,7 @@ class _ProfileSettingsState extends State<ProfileSettings> {
indicatorLayout: PageIndicatorLayout.COLOR, indicatorLayout: PageIndicatorLayout.COLOR,
axisDirection: AxisDirection.right, axisDirection: AxisDirection.right,
controller: _controller, controller: _controller,
itemHeight: 220 + 16, itemHeight: 200.h,
pagination: const SwiperPagination( pagination: const SwiperPagination(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(top: 210 + 8 + 24), margin: EdgeInsets.only(top: 210 + 8 + 24),
@ -269,6 +269,7 @@ class FamilyCardWidget extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8.h, spacing: 8.h,
children: [ children: [
Row( Row(
@ -284,25 +285,27 @@ class FamilyCardWidget extends StatelessWidget {
"${profile.patientName}".toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1), "${profile.patientName}".toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1),
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.file_icon, icon: AppAssets.file_icon,
labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${profile.patientId}", labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${profile.responseId}",
iconSize: 12, iconSize: 12,
), ),
], ],
).expanded, ).expanded,
Icon(Icons.qr_code, size: 56) Icon(Icons.qr_code, size: 56)
], ],
).expanded, ),
SizedBox(height: 4.h),
SizedBox( SizedBox(
width: double.infinity,
child: Wrap( child: Wrap(
alignment: WrapAlignment.start, alignment: WrapAlignment.start,
spacing: 8.h, spacing: 4.h,
runSpacing: 8.h, runSpacing: 4.h,
children: [ children: [
AppCustomChipWidget(labelText: "${profile.age} Years Old"), AppCustomChipWidget(labelText: "${profile.age} Years Old".needTranslation),
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.blood_icon, labelText: "${LocaleKeys.bloodType.tr()}: ${appState.getAuthenticatedUser()!.bloodGroup ?? "N/A"}", iconColor: AppColors.primaryRedColor), icon: AppAssets.blood_icon,
labelPadding: EdgeInsetsDirectional.only(start: -6.h, end: 8.h),
labelText: "Blood: ${appState.getAuthenticatedUser()!.bloodGroup ?? "."}",
iconColor: AppColors.primaryRedColor),
Selector<InsuranceViewModel, ({bool isEmpty, int? patientID, bool isLoading, String? cardValidTo})>( Selector<InsuranceViewModel, ({bool isEmpty, int? patientID, bool isLoading, String? cardValidTo})>(
selector: (context, insuranceVM) => ( selector: (context, insuranceVM) => (
isEmpty: insuranceVM.patientInsuranceList.isEmpty, isEmpty: insuranceVM.patientInsuranceList.isEmpty,
@ -348,6 +351,7 @@ class FamilyCardWidget extends StatelessWidget {
iconColor: iconColor, iconColor: iconColor,
iconSize: 12, iconSize: 12,
backgroundColor: backgroundColor, backgroundColor: backgroundColor,
labelPadding: EdgeInsetsDirectional.only(start: -6.h, end: 8.h),
// padding: EdgeInsets.zero, // padding: EdgeInsets.zero,
).toShimmer2(isShow: isLoading); ).toShimmer2(isShow: isLoading);
}, },
@ -432,7 +436,7 @@ class FamilyCardWidget extends StatelessWidget {
), ),
), ),
], ],
).paddingOnly(top: 16, right: 16, left: 16, bottom: 12).expanded, ).paddingOnly(top: 16.h, right: 16.h, left: 16.h, bottom: 12.h).expanded,
1.divider, 1.divider,
_buildActionButton(appState), _buildActionButton(appState),
@ -506,6 +510,8 @@ class FamilyCardWidget extends StatelessWidget {
borderColor: canSwitch ? AppColors.secondaryLightRedColor : AppColors.primaryRedColor, borderColor: canSwitch ? AppColors.secondaryLightRedColor : AppColors.primaryRedColor,
textColor: canSwitch ? AppColors.primaryRedColor : AppColors.whiteColor, textColor: canSwitch ? AppColors.primaryRedColor : AppColors.whiteColor,
iconColor: canSwitch ? AppColors.primaryRedColor : AppColors.whiteColor, iconColor: canSwitch ? AppColors.primaryRedColor : AppColors.whiteColor,
height: 40.h,
fontSize: 14,
).paddingOnly(top: 12, right: 16, left: 16, bottom: 16); ).paddingOnly(top: 12, right: 16, left: 16, bottom: 16);
} }
@ -520,6 +526,8 @@ class FamilyCardWidget extends StatelessWidget {
textColor: canSwitchBack ? AppColors.whiteColor : AppColors.greyTextColor, textColor: canSwitchBack ? AppColors.whiteColor : AppColors.greyTextColor,
iconColor: canSwitchBack ? AppColors.whiteColor : AppColors.greyTextColor, iconColor: canSwitchBack ? AppColors.whiteColor : AppColors.greyTextColor,
onPressed: canSwitchBack ? () => onFamilySwitchPress(profile) : () {}, onPressed: canSwitchBack ? () => onFamilySwitchPress(profile) : () {},
height: 40.h,
fontSize: 14,
).paddingOnly(top: 12, right: 16, left: 16, bottom: 16); ).paddingOnly(top: 12, right: 16, left: 16, bottom: 16);
} }

@ -47,7 +47,7 @@ class CollapsingListView extends StatelessWidget {
backgroundColor: AppColors.bgScaffoldColor, backgroundColor: AppColors.bgScaffoldColor,
leading: isLeading leading: isLeading
? Transform.flip( ? Transform.flip(
flipX: appState.isArabic() ? true : false, flipX: appState.isArabic(),
child: IconButton( child: IconButton(
icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.closeBottomNav : AppAssets.arrow_back, width: 32.h, height: 32.h), icon: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.closeBottomNav : AppAssets.arrow_back, width: 32.h, height: 32.h),
padding: EdgeInsets.only(left: 12), padding: EdgeInsets.only(left: 12),

@ -63,9 +63,8 @@ class AppCustomChipWidget extends StatelessWidget {
), ),
child: icon.isNotEmpty child: icon.isNotEmpty
? Chip( ? Chip(
avatar: icon.isNotEmpty ? Utils.buildSvgWithAssets(icon: icon, width: iconSize.h, height: iconSize.h, iconColor: iconHasColor ? iconColor : null) : SizedBox.shrink(), avatar: icon.isNotEmpty ? Utils.buildSvgWithAssets(icon: icon, width: iconSize.h, height: iconSize.h, iconColor: iconHasColor ? iconColor : null, fit: BoxFit.contain) : SizedBox.shrink(),
label: richText ?? labelText!.toText10(weight: FontWeight.w500, letterSpacing: 0, color: textColor), label: richText ?? labelText!.toText10(weight: FontWeight.w500, letterSpacing: 0, color: textColor),
// padding: EdgeInsets.all(0.0),
padding: padding, padding: padding,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
labelPadding: labelPadding ?? EdgeInsetsDirectional.only(start: 0.h, end: deleteIcon?.isNotEmpty == true ? 2.h : 8.h), labelPadding: labelPadding ?? EdgeInsetsDirectional.only(start: 0.h, end: deleteIcon?.isNotEmpty == true ? 2.h : 8.h),

Loading…
Cancel
Save