chore: Update start poll design

This commit is contained in:
Christian Kußowski 2025-11-17 10:52:51 +01:00
parent 1528026298
commit f0cf278683
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -79,28 +79,6 @@ class _StartPollBottomSheetState extends State<StartPollBottomSheet> {
body: ListView(
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16),
children: [
SegmentedButton<PollKind>(
selected: {_pollKind},
multiSelectionEnabled: false,
onSelectionChanged: (pollKind) => setState(() {
_pollKind = pollKind.first;
}),
segments: [
ButtonSegment(
value: PollKind.disclosed,
label: Text(
L10n.of(context).answersVisible,
),
),
ButtonSegment(
value: PollKind.undisclosed,
label: Text(
L10n.of(context).answersHidden,
),
),
],
),
const SizedBox(height: 32),
TextField(
controller: _bodyController,
minLines: 1,
@ -147,6 +125,17 @@ class _StartPollBottomSheetState extends State<StartPollBottomSheet> {
label: Text(L10n.of(context).addAnswerOption),
),
),
const Divider(height: 32),
ListTile(
contentPadding: EdgeInsets.zero,
leading: Switch.adaptive(
value: _pollKind == PollKind.disclosed,
onChanged: (allow) => setState(() {
_pollKind = allow ? PollKind.disclosed : PollKind.undisclosed;
}),
),
title: Text(L10n.of(context).answersVisible),
),
ListTile(
contentPadding: EdgeInsets.zero,
leading: Switch.adaptive(