getLabReportsHealthRecord method

dynamic getLabReportsHealthRecord()

Implementation

getLabReportsHealthRecord() async {
  var decodedResponse;

  try {
    final response = await http.get(
      Uri.parse('${WELLNESS_URL}api/diagnostic/users-all-reports'),
      headers: {'Authorization': currentUserToken},
    );

    decodedResponse = json.decode(response.body);

    if (decodedResponse['success'] == true) {
      getLabReportsHealthRecordData = decodedResponse['response'];
    } else {}
  } catch (e) {
    ErrorListner(
        apiname: 'api/diagnostic/users-all-reports',
        responsed: "${decodedResponse}",
        request: "",
        app_error: '${e}');
  }
}