inviteUsers method Null safety
Invites one or more User
with given userIds
to this channel.
After this method completes successfully,
ChannelEventHandler.onUserReceivedInvitation
will be invoked on each invited user's end and
ChannelEventHandler.onUserJoined
can be
invoked based on their channel invitation preference which can be set
through SendbirdSdk.setChannelInvitationPreference
Implementation
Future<void> inviteUsers(List<String> userIds) async {
if (userIds.isEmpty) {
throw InvalidParameterError();
}
await _sdk.api.inviteUsers(
userIds: userIds,
channelUrl: channelUrl,
inviterId: _sdk.state.userId,
);
}