addAllowList method

Future<void> addAllowList(
  1. String groupId,
  2. List<String> members
)

Adds members to the allow list of the group.

Only the group owner or admin can call this method.

Param groupId The group ID.

Param members The members to be added to the allow list of the group.

Throws A description of the exception. See ChatError.

Implementation

Future<void> addAllowList(
  String groupId,
  List<String> members,
) async {
  Map req = {'groupId': groupId, 'members': members};
  Map result = await _channel.invokeMethod(ChatMethodKeys.addWhiteList, req);
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}