/ 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 polls

Copy link

Create a PollListQuery instance to retrieve a list of polls matching the specifications set by PollListQueryParams. After a list of polls is successfully retrieved, you can access the data of each polls from the result list through the polls parameter of the callback handler.

final result = await PollListQuery(
    params: PollListQueryParams(
    channelType: channel.channelType, channelUrl: channel.channelUrl),
    ).loadNext();

PollListQueryParams

Copy link
Parameter nameTypeDescription

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 20, inclusive. (Default: 10)