ActivepackagesDetails method

dynamic ActivepackagesDetails({
  1. dynamic id,
  2. dynamic userpackageId,
})

Implementation

ActivepackagesDetails({id, userpackageId}) async {
  var decodedResponse;
  try {
    http.Response response = await http.get(
        Uri.parse(
            '${SDK_BASE_URL}home_api/package_details?package_id=${id}&user_package_id=${userpackageId}'),
        headers: {
          "Authorization": SignUpController.currentUserToken,
        });
    decodedResponse = json.decode(response.body);
    packagesListDetails = decodedResponse['data']['data'];
    combineModuleDetails = decodedResponse['data']['combined_modules'];
    combineModuleDescription = decodedResponse['data']['short_description'];
    packageCode = decodedResponse['data']['package_data'];
  } catch (e) {
    errorListner(
        apiname:
            'home_api/package_details?package_id=${id}&user_package_id=${userpackageId}',
        responsed: "${decodedResponse}",
        request: '',
        app_error: '${e}');
  }
}