removeAdmin method
Removes a group administrator. Only the group owner can call this method.
Param groupId The group ID.
Param adminId The administrator ID to be removed.
Returns None.
Throws Exception description, see ChatError.
Implementation
Future<void> removeAdmin(
String groupId,
String adminId,
) async {
try {
Map req = {'groupId': groupId, 'admin': adminId};
Map result = await platform_interface.Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.removeAdmin, req);
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}