joinRoom method

Future<ZegoRoomLoginResult> joinRoom(
  1. String roomID, {
  2. String token = '',
  3. bool markAsLargeRoom = false,
})

join room

Implementation

Future<ZegoRoomLoginResult> joinRoom(
  String roomID, {
  String token = '',
  bool markAsLargeRoom = false,
}) async {
  final joinRoomResult = await ZegoUIKitCore.shared.joinRoom(
    roomID,
    markAsLargeRoom: markAsLargeRoom,
  );

  if (ZegoErrorCode.CommonSuccess != joinRoomResult.errorCode) {
    ZegoUIKitCore.shared.error.errorStreamCtrl?.add(ZegoUIKitError(
      code: ZegoUIKitErrorCode.roomLoginError,
      message: 'login room error:${joinRoomResult.errorCode}, '
          'room id:$roomID, large room:$markAsLargeRoom, '
          '${ZegoUIKitErrorCode.expressErrorCodeDocumentTips}',
      method: 'joinRoom',
    ));
  }

  return joinRoomResult;
}