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('${SDK_BASE_URL}api/home_index/show_topup'),
      headers: {
        "Authorization": SignUpController.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}');
  }
}