/ SDKs / Flutter
SDKs
Chat SDKs Flutter v3
Chat SDKs Flutter
Chat SDKs
Flutter
Version 3
Sendbird Chat SDK v3 for Flutter is no longer supported as a new version is released. Check out our latest Chat SDK v4

Retrieve a list of voters

Copy link

Create a PollVoterListQuery instance to retrieve a list of voters matching the specifications set by PollVoterListQueryParams. After a list of voters is successfully retrieved, you can access the data of each voter from the result list through the votes parameter of the callback handler.

// Retrieve a list of voters.
final result = await PollVoterListQuery(
    params: PollVoterListQueryParams(
    pollId: poll1.id,
    pollOptionId: poll1.options[0].id,
    channelType: channel.channelType,
    channelUrl: channel.channelUrl,
    )).loadNext();

PollVoterListQueryParams

Copy link
Parameter nameTypeDescription

pollId

int

Specifies the unique ID of a poll.

pollOptionId

int

Specifies the unique ID of a poll option.

channelType

ChannelType

Specifies the type of the channel.

channelUrl

String

Specifies the URL of the channel.

limit

int

Specifies the number of results to retrieve per page. Acceptable values are 1 to 100, inclusive. (Default: 20)