/ SDKs / Flutter
SDKs
Chat SDKs Flutter v4
Chat SDKs Flutter
Chat SDKs
Flutter
Version 4

Retrieve a poll

Copy link

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

try {
  final poll = await Poll.get(
    params: PollRetrievalParams(
      channelType: channel.channelType,
      channelUrl: channel.channelUrl,
      pollId: POLL_ID,
    ),
  );
} catch (e) {
  // Handle error.
}

PollRetrievalParams

Copy link
Parameter nameTypeDescription

channelUrl

String

Specifies the URL of the channel.

channelType

ChannelType

Specifies the type of the channel.

pollId

int

Specifies the unique ID of a poll.