removeToWishList function

Future<bool> removeToWishList(
  1. {required int id,
  2. bool isListing = false}
)

Implementation

Future<bool> removeToWishList({required int id, bool isListing = false}) async {
  appStore.setFavLoading(true);
  Map req = {"user_id": appStore.userId, 'ref_id': id, "type": isListing ? "listing" : "event"};

  return await removeWishList(req).then((res) {
    toast(res.message);
    appStore.setFavLoading(false);

    return true;
  }).catchError((error) {
    toast(error.toString());
    appStore.setFavLoading(false);

    return false;
  });
}