getFansCount method

Future<void> getFansCount()

Implementation

Future<void> getFansCount() async {
  final userIDList = <String>[roomState.ownerInfo.userId];
  try {
    final followInfoList = await liveService.getUserFollowInfo(userIDList: userIDList);
    if (followInfoList.code == 0 && followInfoList.data != null && followInfoList.data!.isNotEmpty) {
      final result = followInfoList.data![0];
      roomState.ownerInfo.fansCount.value = result.followersCount!;
    }
  } catch (error, stackTrace) {
    LiveKitLogger.error('getFansCount Error: $error\n$stackTrace');
  }
}