fetchChatRoomWhiteListFromServer method Null safety
- @Deprecated("Switch to using EMChatManager#fetchChatRoomAllowListFromServer instead.")
- String roomId
@Deprecated("Switch to using EMChatManager#fetchChatRoomAllowListFromServer instead.")
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
@Deprecated(
"Switch to using EMChatManager#fetchChatRoomAllowListFromServer instead.")
Future<List<String>> fetchChatRoomWhiteListFromServer(String roomId) async {
Map req = {"roomId": roomId};
Map result = await _channel.invokeMethod(
ChatMethodKeys.fetchChatRoomWhiteListFromServer, req);
try {
EMError.hasErrorFromResult(result);
List<String> list = [];
result[ChatMethodKeys.fetchChatRoomWhiteListFromServer]
?.forEach((element) {
if (element is String) {
list.add(element);
}
});
return list;
} on EMError catch (e) {
throw e;
}
}