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/api/api_details/healthcard'),
        body: ApiBody,
        headers: {"Authorization": SignUpController.currentUserToken});
    decodedResponse = json.decode(response.body);
    cashlessCardsList = decodedResponse['health_card'];
  } catch (e) {
    ErrorListner(
        apiname: 'claim_adminpanel/api/api_details/healthcard',
        responsed: "${decodedResponse}",
        request: '${ApiBody}',
        app_error: '${e}');
  }
}