createChannel method
Creates an AgoraRtmChannel.
channelId is the unique channel name of the Agora RTM session. The string length must not exceed 64 bytes with the following character scope:
- The 26 lowercase English letters: a to z
- The 26 uppercase English letters: A to Z
- The 10 numbers: 0 to 9
- Space
- "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "]", "[", "^", "_", " {", "}", "|", "~", "," channelId cannot be empty or set as nil.
Implementation
Future<AgoraRtmChannel?> createChannel(String channelId) async {
await _callNative("createChannel", {'channelId': channelId});
AgoraRtmChannel channel = AgoraRtmChannel(_clientIndex, channelId);
_channels[channelId] = channel;
return _channels[channelId];
}