sendInRoomMessage method

Future<bool> sendInRoomMessage(
  1. String message
)

send in-room message

Implementation

Future<bool> sendInRoomMessage(String message) async {
  final resultErrorCode =
      await ZegoUIKitCore.shared.message.sendBroadcastMessage(message);

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

  return ZegoErrorCode.CommonSuccess == resultErrorCode;
}