likeUnlike function

Future<String> likeUnlike(
  1. {required int socialFeedId}
)

Implementation

Future<String> likeUnlike({required int socialFeedId}) async {
  appStore.setLoading(true);

  Map req = {UserKeys.userId: appStore.userId, UserKeys.socialFeedId: socialFeedId};
  try {
    var res = CommonModel.fromJson(await (handleResponse(await buildHttpResponse(APIEndPoint.likeUnlike, request: req, method: HttpMethod.POST))));
    appStore.setLoading(false);
    return res.message.validate();
  } catch (e) {
    appStore.setLoading(false);
    throw errorSomethingWentWrong;
  }
}