followBackOrUnfollow function
Implementation
Future<String> followBackOrUnfollow({required int userId, required bool isUnfollow}) async {
appStore.setLoading(true);
Map req = {FriendKey.followers: appStore.userId, FriendKey.following: userId};
try {
var res = FollowersModel.fromMap(await (handleResponse(await buildHttpResponse(isUnfollow ? APIEndPoint.unfollow : APIEndPoint.follow, request: req, method: HttpMethod.POST))));
appStore.setLoading(false);
return res.message.validate();
} catch (e) {
appStore.setLoading(false);
throw errorSomethingWentWrong;
}
}