fetchWhiteListFromServer method Null safety
- @Deprecated("Switch to using fetchAllowListFromServer instead.")
- String groupId
@Deprecated("Switch to using fetchAllowListFromServer instead.")
Gets the allow list of the group from the server.
Only the group owner or admin can call this method.
Param groupId
The group ID.
Return The allow list of the group.
Throws A description of the exception. See {@link EMError}.
Implementation
@Deprecated("Switch to using fetchAllowListFromServer instead.")
Future<List<String>> fetchWhiteListFromServer(String groupId) async {
Map req = {'groupId': groupId};
Map result = await _channel.invokeMethod(
ChatMethodKeys.getGroupWhiteListFromServer, req);
try {
List<String> list = [];
EMError.hasErrorFromResult(result);
result[ChatMethodKeys.getGroupWhiteListFromServer]?.forEach((element) {
if (element is String) {
list.add(element);
}
});
return list;
} on EMError catch (e) {
throw e;
}
}