/ 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 poll option

Copy link

You can retrieve a specific poll option by creating and passing a PollOptionRetrievalParams object as an argument to the PollOption.get() method.

var result = await PollOption.get(
    params: PollOptionRetrievalParams(
      channelUrl: channel.channelUrl,
      pollOptionId: result.options[0].id,
      pollId: result.id,
      channelType: channel.channelType,
    ),
);

List of properties for poll option

Copy link
Property nameTypeDescription

pollId

int

Specifies the unique ID of a poll.

pollOptionId

int

Specifies the unique ID of a poll option. This value is unique within a poll.

text

String

Specifies the text that describes an option.

createdBy

String

Specifies the unique ID of the user who created an option.

createdAt

int

Specifies the time when an option is created in Unix seconds.

voteCount

int

Specifies the number of votes casted on an option.

updatedAt

int

Specifies the time when an option is updated in Unix seconds.

PollOptionRetrievalParams

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.