getTeleconsultationSymptomsList method

dynamic getTeleconsultationSymptomsList()

Implementation

getTeleconsultationSymptomsList() async {
  var decodedResponse;
  var url = '${medicine_API}api/teleconsultation/symptoms';
  try {
    if (packageId != '') {
      url += '?package_id=$packageId';
    }

    http.Response response = await http.get(
      Uri.parse('${url}'),
      headers: {
        "Authorization": currentUserToken,
      },
    );
    decodedResponse = json.decode(response.body);
    teleconsultationsSymptomsList = decodedResponse['data']['symptoms'];
    teleconsultationsSymptomsData =
        decodedResponse['data']['department_dropdown'];
  } catch (e) {
    ErrorListner(
        apiname: '$url',
        responsed: "${decodedResponse}",
        request: '',
        app_error: '${e}');
  }
}