getBookTeleconsultationDetails method

dynamic getBookTeleconsultationDetails({
  1. dynamic teleconsultationId,
})

Implementation

getBookTeleconsultationDetails({teleconsultationId}) async {
  var decodedResponse;
  var url =
      '${medicine_API}api/teleconsultation/get-consultation-details/$teleconsultationId';
  try {
    http.Response response = await http.get(
      Uri.parse('${url}'),
      headers: {
        "Authorization": currentUserToken,
      },
    );

    decodedResponse = json.decode(response.body);
    if (decodedResponse['success'] == true) {
      teleconsultationOrderDetails = decodedResponse;
      teleconsultationPlaceOrderId =
          await decodedResponse['data']['order_details']['id'];
    } else {}
  } catch (e) {
    ErrorListner(
        apiname: '$url',
        responsed: "${decodedResponse}",
        request: '',
        app_error: '${e}');
  }
}