Chat / Flutter
Current version: v3
Chat Flutter v3
Chat Flutter
Chat
Flutter
Home
/
Chat
/
Flutter
/
Channel

Invite users as members

To enter a private group channel, a user must be invited by members who are already in the group channel. On the other hand, an invitation isn't required to join a public group channel. Only members of a group channel can invite new users to the channel.

You can also determine whether the newly invited user can see past messages in the channel or not. You can manage the settings on Sendbird Dashboard. Go to Settings > Chat > Channels > Group channels, and you will see the Chat history option. If the option is turned on, newly joined members can view all messages sent before they joined the channel. If turned off, new members can only see messages sent after they were invited. By default, this option is turned on.

final userIds = ['bob', 'young']
try {
    await groupChannel.inviteUsers(userIds);
} catch (e) {
    // Handle error.
}

List of properties

Property nameTypeDescription

userIds

List

Specifies the list of user IDs to invite to the channel.