Chat / Flutter
Chat Flutter v3
Chat Flutter
Chat
Flutter
Version 3
Home
/
Chat
/
Flutter
/
User

Retrieve a list of banned users

Copy link

You can create a query to retrieve a list of banned users in both open and group channels. Only users registered as channel operators may use the following code.

try {
    // Retrieve banned users.
    final query = UserListQuery()
    ..queryType = UserListQueryType.banned;
        ..channelType=ChannelType.channel // Channel can be open or group.

    final users = await listQuery.loadNext();
} catch (e) {
    // Handle error.
}