import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; class EyeService extends BaseService { List appoimentAllHistoryResultList = List(); getEyeMeasurement() async { hasError = false; super.error = ""; Map body = Map(); body['isDentalAllowedBackend'] = false; body['IsIrisPrescription'] = true; await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async { appoimentAllHistoryResultList.clear(); response['AppoimentAllHistoryResultList'].forEach((appoitment) { appoimentAllHistoryResultList .add(AppoimentAllHistoryResultList.fromJson(appoitment)); }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: body); } }