# Polls

Stream Chat's Flutter SDK includes the capability to create polls within your chat application. Polls are an effective tool for enhancing user interaction and engagement, providing a dynamic way to gather opinions and feedback.

<admonition type="note">

Polls on Flutter are available since version [9.0.0](https://github.com/GetStream/stream-chat-flutter/releases/tag/9.0.0).

</admonition>

Polls are disabled by default. In order to enable this feature, you need to go to the Stream dashboard for your app, and enable the "Polls" flag for your channel type.

![Screenshot showing how to enable polls](../_assets/polls_dashboard.png)

As soon as you do that, an additional "Polls" icon would be shown in the attachment picker in the default composer implementation in the SDK.

![Screenshot showing polls icon in the composer](../_assets/polls_composer.png)

## Poll Creator

When you tap the "Polls" icon, a new screen for creating polls would be shown. On this screen, you can configure the poll title, the options, as well as several other settings, such as the maximum number of votes, whether the poll is anonymous and if it allows comments.

![Screenshot showing create poll view](../_assets/poll_creator.png)

You can also set various configuration used to validate while creating the poll. In order to do that, you need to provide your own `PollConfig`.

```dart
const pollConfig = PollConfig(
  nameRange: (min: 1, max: 80),
  optionsRange: (min: 1, max: 10),
  allowDuplicateOptions: false,
  allowedVotesRange: (min: 2, max: 10),
);

StreamMessageInput(
  ...,
  pollConfig: pollConfig,
);
```

## Override Poll Creator Screen

You can customize the poll creation screen by overriding the `poll-creator` option in your [StreamAttachmentsPicker](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/custom_widgets/customize_attachment_picker_modal/). This allows you to tailor the appearance and behavior of the poll creation screen to better fit your application's needs and user experience expectations.

```dart
showStreamAttachmentPickerModalBottomSheet(
  context: context,
  customOptions: [
    // Make sure to set the key and supportedTypes to 'poll-creator' and [AttachmentPickerType.poll]
    // to override the default poll creation screen.
    AttachmentPickerOption(
      key: 'poll-creator',
      icon: StreamSvgIcon.polls().toIconThemeSvgIcon(),
      supportedTypes: [AttachmentPickerType.poll],
      optionViewBuilder: (context, controller) {
        // Return your custom widget here
      },
    ),
  ],
);
```

## Poll Interactor

![Poll Interactor](../_assets/poll_interactor.png)

The [StreamPollInteractor](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_flutter/lib/src/poll/interactor/stream_poll_interactor.dart) displays the poll question and answer options, distinguishing between the poll owner and other users. It allows user interaction, shows real-time vote counts and participants, and displays the question title, answer items, and additional option buttons.

It is displayed as an item of the [MessageListView](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_flutter/lib/src/message_widget/poll_message.dart) similar to other messages and attachments.

---

This page was last updated at 2025-08-15T14:15:53.837Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/polls/](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/polls/).