Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-07 11:54:28 +08:00
parent cae5befa63
commit 1946218df3
21 changed files with 446 additions and 334 deletions

View File

@@ -90,7 +90,7 @@ class _CreateVotePageState extends State<CreateVotePage> {
theme,
key: ValueKey('${_controller.key}desc'),
initialValue: _controller.desc.value,
onChanged: (value) => _controller.desc.value = value,
onChanged: _controller.desc.call,
desc: '投票说明',
inputFormatters: [LengthLimitingTextInputFormatter(100)],
),
@@ -190,10 +190,7 @@ class _CreateVotePageState extends State<CreateVotePage> {
child: PopupMenuButton<int>(
initialValue: choiceCnt,
requestFocus: false,
child: Text(
choiceCnt == 1 ? '单选 ' : '最多选$choiceCnt项',
),
onSelected: (value) => _controller.choiceCnt.value = value,
onSelected: _controller.choiceCnt.call,
itemBuilder: (context) {
return choices
.map(
@@ -204,6 +201,9 @@ class _CreateVotePageState extends State<CreateVotePage> {
)
.toList();
},
child: Text(
choiceCnt == 1 ? '单选 ' : '最多选$choiceCnt项',
),
),
);
}),