getCategoryDetails method
Future
getCategoryDetails(
{ - dynamic id,
})
Implementation
Future getCategoryDetails({id}) async {
var decodedResponse;
try {
final response = await http.get(
Uri.parse('${medicine_API}api/diagnostic/get-categories/${id}'),
headers: {'Authorization': currentUserToken},
);
decodedResponse = json.decode(response.body);
CategoryDetails = await decodedResponse['data'];
} catch (e) {
ErrorListner(
apiname: 'api/diagnostic/get-categories/3',
responsed: "${decodedResponse}",
request: "",
app_error: '${e}');
}
}