sendInRoomCommand method

Future<bool> sendInRoomCommand(
  1. String command,
  2. List<String> toUserIDs
)

toUserIDs send to everyone if empty

Implementation

Future<bool> sendInRoomCommand(
  String command,
  List<String> toUserIDs,
) async {
  final resultErrorCode =
      await ZegoUIKitCore.shared.sendInRoomCommand(command, toUserIDs);

  if (ZegoUIKitErrorCode.success != resultErrorCode) {
    ZegoUIKitCore.shared.error.errorStreamCtrl?.add(
      ZegoUIKitError(
        code: ZegoUIKitErrorCode.customCommandSendError,
        message: 'send in-room command error:$resultErrorCode, '
            'command:$command, to user ids:$toUserIDs, '
            '${ZegoUIKitErrorCode.expressErrorCodeDocumentTips}',
        method: 'sendInRoomCommand',
      ),
    );
  }

  return ZegoErrorCode.CommonSuccess == resultErrorCode;
}