From 6ec0d8f5894796039e332a6f746eb5bbb1e57cfa Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Sat, 7 Jun 2025 18:32:36 +0800 Subject: [PATCH] opt vote option Signed-off-by: bggRGjQaUbCoE --- lib/pages/dynamics/widgets/vote.dart | 29 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/pages/dynamics/widgets/vote.dart b/lib/pages/dynamics/widgets/vote.dart index 1cab0a627..eeab9785e 100644 --- a/lib/pages/dynamics/widgets/vote.dart +++ b/lib/pages/dynamics/widgets/vote.dart @@ -225,23 +225,28 @@ class PercentageChip extends StatelessWidget { Padding( padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10), child: Row( - // mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.spaceBetween, + spacing: 8, children: [ - Row( - mainAxisSize: MainAxisSize.min, - children: [ - Text(label, maxLines: 1, overflow: TextOverflow.ellipsis), - if (selected) - Padding( - padding: const EdgeInsets.only(left: 4), - child: Icon( + Expanded( + child: Row( + spacing: 4, + mainAxisSize: MainAxisSize.min, + children: [ + Flexible( + child: Text( + label, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + if (selected) + Icon( Icons.check_circle, size: 12, color: colorScheme.onPrimaryContainer, ), - ), - ], + ], + ), ), if (percentage != null) Text('${(percentage! * 100).toStringAsFixed(0)}%'),