getPackageDescription method

Future getPackageDescription({
  1. dynamic id,
})

Implementation

Future getPackageDescription({id}) async {
  var decodedResponse;
  try {
    final response = await http.get(
      Uri.parse(
          '${SDK_BASE_URL}diagnostics_api/package_details?package_id=${id}'),
      headers: {'Authorization': SignUpController.currentUserToken},
    );
    decodedResponse = json.decode(response.body);
    GetPackageDescription = decodedResponse['data'];
  } catch (e) {
    errorListner(
        apiname: 'diagnostics_api/package_details?package_id=${id}',
        responsed: "${decodedResponse}",
        request: '',
        app_error: '${e}');
  }
}