getFavouriteListingList function

Future<List<ListingListData>> getFavouriteListingList()

Implementation

Future<List<ListingListData>> getFavouriteListingList() async {
  appStore.setLoading(true);
  try {
    var res = ListingResponse.fromMap(await (handleResponse(await buildHttpResponse("${APIEndPoint.favouriteList}?type=$LISTING&user_id=${appStore.userId}", method: HttpMethod.GET))));
    appStore.setLoading(false);
    return res.data!.listingListData.validate();
  } catch (e) {
    appStore.setLoading(false);
    throw errorSomethingWentWrong;
  }
}