getSuperTopUpDetails method

dynamic getSuperTopUpDetails({
  1. dynamic userPackageId,
})

Implementation

getSuperTopUpDetails({userPackageId}) async {
  var decodedResponse;
  final ApiBody = {"user_package_id": userPackageId};
  try {
    http.Response response = await http.post(
      Uri.parse('${medicine_API}api/home_index/show_topup'),
      headers: {
        "Authorization": currentUserToken,
      },
      body: ApiBody,
    );

    decodedResponse = json.decode(response.body);
    topUpDetails = decodedResponse;
    relationShipList = decodedResponse['relation_dropdown'];
    occupationList = decodedResponse['occupation_list'];
    nomineeRelationList = decodedResponse['nominee_relation_dropdown'];
  } catch (e) {
    ErrorListner(
        apiname: 'api/home_index/show_topup',
        responsed: "${decodedResponse}",
        request: '${ApiBody}',
        app_error: '${e}');
  }
}