PolicyMycoverageList method
Implementation
Future PolicyMycoverageList() async {
var decodedResponse;
final ApiBody = {
"policy_no": "${policyList[indexvalue]['policy_no']}",
"insurer_id": "${policyList[indexvalue]['insurer_id']}",
"product_id": "${policyList[indexvalue]['product_id']}",
"sub_plan_id": "${policyList[indexvalue]['sub_plan_id']}",
"suminsured_id": "${policyList[indexvalue]['suminsured_id']}"
};
try {
final response = await http.post(
Uri.parse('${SDK_BASE_URL}claim_adminpanel/claim_api/auto_popup'),
body: ApiBody,
headers: {"Authorization": SignUpController.currentUserToken});
decodedResponse = json.decode(response.body);
myCoverageList = decodedResponse['gmc_groupwise'];
} catch (e) {
errorListner(
apiname: 'claim_adminpanel/claim_api/auto_popup',
responsed: "${decodedResponse}",
request: '${ApiBody}',
app_error: '${e}');
}
}