addMembers method Null safety
Adds users to the group.
Only the group owner or admin can call this method.
Param groupId
The group ID.
Param members
The array of new members to add.
Param welcome
The welcome message.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<void> addMembers(
String groupId,
List<String> members, {
String? welcome,
}) async {
Map req = {'groupId': groupId, 'members': members};
req.setValueWithOutNull("welcome", welcome);
Map result = await _channel.invokeMethod(ChatMethodKeys.addMembers, req);
try {
EMError.hasErrorFromResult(result);
} on EMError catch (e) {
throw e;
}
}