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

Update a poll option

Copy link

You can update a poll option by specifying the pollId, the pollOptionId, and an updated string for optionText parameters in the updatePollOption() method.

try {
  // Update the text of a poll option.
  final poll = await channel.updatePollOption(
    pollId: POLL_ID,
    pollOptionId: POLL_OPTION_ID,
    optionText: 'OPTION_TEXT',
} catch (e) {
  // Handle error.