feat: create vote (#871)

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
dom
2025-07-04 22:10:11 +08:00
committed by GitHub
parent 9ce84fb997
commit 83459df3b7
18 changed files with 800 additions and 67 deletions

View File

@@ -146,14 +146,14 @@ class _VotePanelState extends State<VotePanel> {
child: Builder(
builder: (context) {
final opt = _voteInfo.options[index];
final selected = groupValue.contains(opt.optidx);
final selected = groupValue.contains(opt.optIdx);
return PercentageChip(
label: opt.optdesc!,
label: opt.optDesc!,
percentage: _showPercentage ? _percentage[index] : null,
selected: selected,
onSelected: !_enabled || (groupValue.length >= _maxCnt && !selected)
? null
: (value) => _onSelected(context, value, opt.optidx!),
: (value) => _onSelected(context, value, opt.optIdx!),
);
},
),