DentalDetailFunction method

dynamic DentalDetailFunction()

Implementation

DentalDetailFunction() async {
  var decodedResponse;
  try {
    http.Response response = await http
        .get(Uri.parse('${SDK_BASE_URL}dental_api/consultation'), headers: {
      "Authorization": SignUpController.currentUserToken,
    });
    decodedResponse = json.decode(response.body);
    DentalDetails.value = decodedResponse;
    dentalImages = decodedResponse['banner'];
    treatmentslist = decodedResponse['treatments_data']['treatments_list'];
    nearestcity = decodedResponse['nearest_city'];
  } catch (e) {
    errorListner(
        apiname: 'dental_api/consultation',
        responsed: "${decodedResponse}",
        request: '',
        app_error: '${e}');
  }
}