dyn topic fold

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-06 12:22:27 +08:00
parent 5e1c73abc1
commit aa03eed92d
13 changed files with 184 additions and 97 deletions

View File

@@ -87,13 +87,23 @@ class ActionPanel extends StatelessWidget {
Expanded(
child: Builder(
builder: (context) {
final IconData icon;
final Color color;
final String label;
if (like.status ?? false) {
icon = FontAwesomeIcons.solidThumbsUp;
color = primary;
label = '已赞';
} else {
icon = FontAwesomeIcons.thumbsUp;
color = outline;
label = '点赞';
}
final likeIcon = Icon(
like.status!
? FontAwesomeIcons.solidThumbsUp
: FontAwesomeIcons.thumbsUp,
icon,
size: 16,
color: like.status! ? primary : outline,
semanticLabel: like.status! ? "已赞" : "点赞",
color: color,
semanticLabel: label,
);
return TextButton.icon(
onPressed: () => RequestUtils.onLikeDynamic(