send method
Future<bool>
send(
- String message, {
- ZegoInRoomMessageType type = ZegoInRoomMessageType.broadcastMessage,
sends the chat message
@return Error code, please refer to the error codes document https://docs.zegocloud.com/en/5548.html for details.
@return A Future
that representing whether the request was successful.
Implementation
Future<bool> send(
String message, {
ZegoInRoomMessageType type = ZegoInRoomMessageType.broadcastMessage,
}) async {
if (!_enableProperty.value) {
ZegoLoggerService.logInfo(
'chat enabled property is false, not allow to send message',
tag: 'live-streaming',
subTag: 'controller.message',
);
return false;
}
return ZegoUIKit().sendInRoomMessage(message, type: type);
}