getTeleconsultationBanners method

Future getTeleconsultationBanners()

Implementation

Future getTeleconsultationBanners() async {
  var decodedResponse;

  try {
    final response = await http.get(
      Uri.parse('${medicine_API}api/teleconsultation/banners'),
      headers: {'Authorization': currentUserToken},
    );

    decodedResponse = json.decode(response.body);

    if (response.statusCode == 200) {
      teleconsultationBanners = decodedResponse['banners'];
    }
  } catch (e) {
    ErrorListner(
        apiname: 'api/teleconsultation/banners',
        responsed: "${decodedResponse}",
        request: "",
        app_error: '${e}');
  }
}