unfollowUser method

void unfollowUser(
  1. String userId
)

Implementation

void unfollowUser(String userId) async {
  final result = await friendshipManager.unfollowUser(userIDList: [userId]);
  const success = 0;
  if (result.code == success) {
    final Set<String> followingList = Set.from(state.followingList.value);
    followingList.removeWhere((userID) => userID == userId);
    state.followingList.value = followingList;
    getFansNumber();
  }
}