getTestDetails method

Future getTestDetails({
  1. dynamic id,
})

Implementation

Future getTestDetails({id}) async {
  var decodedResponse;
  try {
    final response = await http.get(
      Uri.parse('${medicine_API}api/diagnostic/get-tests/${id}'),
      headers: {'Authorization': currentUserToken},
    );
    decodedResponse = json.decode(response.body);
    TestDetails = await decodedResponse['data'][0];
  } catch (e) {
    ErrorListner(
        apiname: 'api/diagnostic/get-tests/${id}',
        responsed: "${decodedResponse}",
        request: "",
        app_error: '${e}');
  }
}