setGroupAdminsAsync method

Future<void> setGroupAdminsAsync(
  1. String groupId, {
  2. List<String> addToAdmins = const [],
  3. List<String> removeFromAdmins = const [],
})

Adds some existing group members to the group admins, and/or removes admin status from some existing group admins. Can only be done by a group administrator.

groupId - The group for which to set admins. addToAdmins - The Seald IDs of existing group members to add as group admins. removeFromAdmins - The Seald IDs of existing group members to remove from group admins.

Implementation

Future<void> setGroupAdminsAsync(String groupId,
    {List<String> addToAdmins = const [],
    List<String> removeFromAdmins = const []}) {
  return compute(
      (Map<String, dynamic> args) => setGroupAdmins(args["groupId"],
          removeFromAdmins: args["removeFromAdmins"]),
      {"groupId": groupId, "removeFromAdmins": removeFromAdmins});
}