getBusinessEventListModel function
Implementation
Future<List<BusinessEventList>> getBusinessEventListModel({String? status, int? businessId}) async {
log("-------------- Business Event list model Api Call -------------");
appStore.setLoading(true);
try {
String _status = "&status=${status.validate()}";
String _businessId = "&business_id=${businessId.validate()}";
var res = await BusinessEventListModel.fromJson(await (handleResponse(await buildHttpResponse("${APIEndPoint.businessEventList}?user_id=${appStore.userId}$_status$_businessId", method: HttpMethod.GET))));
appStore.setLoading(false);
return res.data!;
} catch (e) {
appStore.setLoading(false);
throw errorSomethingWentWrong;
}
}