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<TUIUserInfo> followingList =
        Set.from(state.followingList.value);
    followingList.removeWhere((following) => following.userId == userId);
    state.followingList.value = followingList;
    getFansNumber();
  }
}