removeChatRoomAdmin method

Future<void> removeChatRoomAdmin(
  1. String roomId,
  2. String admin
)

Removes privileges of a chat room admin.

Param roomId The chat room ID.

Param admin The ID of admin whose privileges are to be removed.

Throws A description of the exception. See ChatError.

Implementation

Future<void> removeChatRoomAdmin(
  String roomId,
  String admin,
) async {
  try {
    Map req = {"roomId": roomId, "admin": admin};
    Map result = await platform_interface.Client.instance.chatRoomManager
        .callNativeMethod(ChatMethodKeys.removeChatRoomAdmin, req);
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}