import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/live_care/PendingPatientERForDoctorAppRequestModel.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; class LiveCarePatientServices extends BaseService{ List _patientList = []; List get patientList => _patientList; Future getPendingPatientERForDoctorApp(PendingPatientERForDoctorAppRequestModel pendingPatientERForDoctorAppRequestModel) async{ hasError = false; await baseAppClient.post( GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) { _patientList.clear(); response['List_PendingPatientList'].forEach((v) { _patientList.add(PatiantInformtion.fromJson(v)); }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: pendingPatientERForDoctorAppRequestModel.toJson(), ); } }