fetchChatRoomWhiteListFromServer method Null safety
- String roomId
Gets the allow list from the server.
Only the chat room owner or admin can call this method.
Param roomId
The chat room ID.
Return The chat room allow list.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<List<String>?> fetchChatRoomWhiteListFromServer(String roomId) async {
Map req = {"roomId": roomId};
Map result = await _channel.invokeMethod(
ChatMethodKeys.fetchChatRoomWhiteListFromServer, req);
EMError.hasErrorFromResult(result);
List<String> contacts = [];
result[ChatMethodKeys.fetchChatRoomWhiteListFromServer]?.forEach((element) {
contacts.add(element);
});
return contacts;
}