getEventListDetailModel function
Implementation
Future<EventListDetail> getEventListDetailModel(int id) async {
log("-------------- Event list detail model Api Call -------------");
appStore.setLoading(true);
String userId = (appStore.userId != null && appStore.userId != 0) ? "&user_id=${appStore.userId}" : '';
try {
var res = await EventDetailModelResponse.fromJson(await (handleResponse(await buildHttpResponse("${APIEndPoint.eventDetails}?id=${id}$userId", method: HttpMethod.GET))));
eventDetailData = res.data!;
appStore.setLoading(false);
return res.data!;
} catch (e) {
appStore.setLoading(false);
throw errorSomethingWentWrong;
}
}