getPrescriptionHealthRecord method

dynamic getPrescriptionHealthRecord()

Implementation

getPrescriptionHealthRecord() async {
  var decodedResponse;

  try {
    final response = await http.get(
      Uri.parse('${WELLNESS_URL}api/teleconsultation/health-record'),
      headers: {'Authorization': currentUserToken},
    );

    decodedResponse = json.decode(response.body);

    if (decodedResponse['success'] == true) {
      getPrescriptionHealthRecordData = decodedResponse['data'];
    } else {}
  } catch (e) {
    ErrorListner(
        apiname: 'api/teleconsultation/health-record',
        responsed: "${decodedResponse}",
        request: "",
        app_error: '${e}');
  }
}