getBlockListFromServer method Null safety
- @Deprecated("Switch to using fetchBlockListFromServer instead.")
@Deprecated("Switch to using fetchBlockListFromServer instead.")
Gets the group block list from server with pagination.
Only the group owner or admin can call this method.
Param groupId
The group ID.
Param pageSize
The number of groups per page.
Param pageNum
The page number, starting from 1.
Return The group block list.
Throws A description of the exception. See {@link EMError}.
Implementation
@Deprecated("Switch to using fetchBlockListFromServer instead.")
Future<List<String>?> getBlockListFromServer(
String groupId, {
int pageSize = 200,
int pageNum = 1,
}) async {
Map req = {'groupId': groupId, 'pageNum': pageNum, 'pageSize': pageSize};
Map result = await _channel.invokeMethod(
ChatMethodKeys.getGroupBlockListFromServer, req);
try {
EMError.hasErrorFromResult(result);
return result[ChatMethodKeys.getGroupBlockListFromServer]?.cast<String>();
} on EMError catch (e) {
throw e;
}
}