chore: Update start poll design
This commit is contained in:
parent
1528026298
commit
f0cf278683
1 changed files with 11 additions and 22 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue