getEventListing function
Future<void>
getEventListing(- {bool isFromBottom = false,
- bool isFromSort = false,
- bool isSaveFilter = false,
- bool isFromReset = false}
)
Implementation
Future<void> getEventListing({bool isFromBottom = false, bool isFromSort = false, bool isSaveFilter = false, bool isFromReset = false}) async {
log("-------------- Event Api Call -------------");
appStore.setLoading(true);
await getEventList(isSaveFilter: isSaveFilter, isFromReset: isFromReset).then((value) {
if (value?.eventListData != null) {
(isFromSort) ? appStore.sortAddEventData(value!.eventListData!) : appStore.addEventData(value!.eventListData!);
}
appStore.setLoading(false);
}).catchError((e) {
toast(e.toString(), print: true);
appStore.setLoading(false);
});
}