removeAdmin method Null safety
Removes a group admin.
Only the group owner can call this method.
Param groupId
The group ID.
Param adminId
The username of the admin to remove.
Return The updated group instance.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<void> removeAdmin(
String groupId,
String adminId,
) async {
Map req = {'groupId': groupId, 'admin': adminId};
Map result = await _channel.invokeMethod(ChatMethodKeys.removeAdmin, req);
try {
EMError.hasErrorFromResult(result);
} on EMError catch (e) {
throw e;
}
}