CashlessCards method

Future CashlessCards()

Implementation

Future CashlessCards() async {
  var decodedResponse;
  final ApiBody = {"policy_no": "${policyList[indexvalue]['policy_no']}"};
  try {
    final response = await http.post(
        Uri.parse('${SDK_BASE_URL}claim_adminpanel/claim_api/health_card'),
        body: ApiBody,
        headers: {"Authorization": SignUpController.currentUserToken});
    decodedResponse = json.decode(response.body);
    cashlessCardsList = decodedResponse['health_card'];
  } catch (e) {
    errorListner(
        apiname: 'claim_adminpanel/claim_api/health_card',
        responsed: "${decodedResponse}",
        request: '${ApiBody}',
        app_error: '${e}');
  }
}