TeleConsultationList method

dynamic TeleConsultationList()

Implementation

TeleConsultationList() async {
  var decodedResponse;
  try {
    http.Response response = await http
        .get(Uri.parse('${SDK_BASE_URL}teleconsultation_api/list'), headers: {
      "Authorization": SignUpController.currentUserToken,
    });
    decodedResponse = json.decode(response.body);
    teleconsultation = decodedResponse['tele_departments']['teleconsultaton'];
    symptoms = decodedResponse['tele_departments']['symptoms'];
    teleconsultationBanners =
        decodedResponse['tele_departments']['teleconsultation_banners'];
    pendingamount = decodedResponse['wallet']['module_pending'];
    freeTeleconsultation =
        decodedResponse['tele_departments']['free_teleconsultation'];
    freeTeleconsultationImage =
        decodedResponse['tele_departments']['gp_banner'];
  } catch (e) {
    errorListner(
        apiname: 'teleconsultation_api/list',
        responsed: "${decodedResponse}",
        request: '',
        app_error: '${e}');
  }
}