PackageDetails method
Future
PackageDetails(
{ - dynamic package_Id,
})
Implementation
Future PackageDetails({package_Id}) async {
var decodedResponse;
try {
final response = await http.get(
Uri.parse(
'${WELLNESS_URL}api/package/package-details?package_id=$package_Id'),
headers: {'Authorization': currentUserToken},
);
decodedResponse = json.decode(response.body);
if (decodedResponse['success'] == true) {
packageOtherDetails = decodedResponse['data'];
getpackageDetails = await decodedResponse['data']['info_data'];
combineModulesList = getpackageDetails
.where((service) => service['combined_modules'] == 1)
.toList();
PackageDetailsData = getpackageDetails
.where((service) => service['combined_modules'] == 0)
.toList();
}
} catch (e) {
ErrorListner(
apiname: 'api/package/package-details?package_id=$package_Id',
responsed: "${decodedResponse}",
request: "",
app_error: '${e}',
);
}
}