addGroupMembersAsync method
Adds members to a group. Can only be done by a group administrator. Can also specify which of these newly added group members should also be admins.
groupId
- The group in which to add members.
membersToAdd
- The Seald IDs of the members to add to the group.
adminsToSet
- The Seald IDs of the newly added members to also set as group admins.
privateKeys
- Optional. Pre-generated private keys, returned by a call to SealdSdk.generatePrivateKeysAsync.
Implementation
Future<void> addGroupMembersAsync(String groupId,
{required List<String> membersToAdd,
List<String> adminsToSet = const [],
SealdGeneratedPrivateKeys? privateKeys}) {
return compute(
(Map<String, dynamic> args) => addGroupMembers(args["groupId"],
membersToAdd: args["membersToAdd"],
adminsToSet: args["adminsToSet"],
privateKeys: args["privateKeys"]),
{
"groupId": groupId,
"membersToAdd": membersToAdd,
"adminsToSet": adminsToSet,
"privateKeys": privateKeys
});
}