getClaimedBusinessList function
Implementation
Future<List<ListingListData>> getClaimedBusinessList({bool showLoader = false, bool isFavourite = false, String businessText = ""}) async {
if (showLoader) appStore.setLoading(true);
try {
String userId = appStore.userId != null ? "?user_id=${appStore.userId.toString()}&search=${businessText}" : '';
ListingResponse res = ListingResponse.fromMap(await (handleResponse(await buildHttpResponse("${APIEndPoint.claimedListingList}$userId", method: HttpMethod.GET))));
appStore.setLoading(false);
return await res.data!.listingListData.validate();
} catch (e) {
appStore.setLoading(false);
throw errorSomethingWentWrong;
}
}