* tweaks

* opt: semantics
This commit is contained in:
My-Responsitories
2026-06-13 02:43:37 +00:00
committed by dom
parent d159488495
commit 1b3f27aa31
23 changed files with 82 additions and 193 deletions

View File

@@ -397,7 +397,6 @@ class _PgcIntroPageState extends State<PgcIntroPage> {
icon: const Icon(FontAwesomeIcons.thumbsUp),
selectIcon: const Icon(FontAwesomeIcons.solidThumbsUp),
selectStatus: introController.hasLike.value,
semanticsLabel: '点赞',
text: NumUtils.numFormat(item.stat!.like),
onStartTriple: introController.onStartTriple,
onCancelTriple: introController.onCancelTriple,
@@ -410,7 +409,6 @@ class _PgcIntroPageState extends State<PgcIntroPage> {
selectIcon: const Icon(FontAwesomeIcons.b),
onTap: introController.actionCoinVideo,
selectStatus: introController.hasCoin,
semanticsLabel: '投币',
text: NumUtils.numFormat(item.stat!.coin),
),
),
@@ -425,7 +423,6 @@ class _PgcIntroPageState extends State<PgcIntroPage> {
isLongPress: true,
),
selectStatus: introController.hasFav.value,
semanticsLabel: '收藏',
text: NumUtils.numFormat(item.stat!.favorite),
),
),
@@ -436,7 +433,6 @@ class _PgcIntroPageState extends State<PgcIntroPage> {
onTap: () =>
introController.handleAction(introController.viewLater),
selectStatus: introController.hasLater.value,
semanticsLabel: '再看',
text: '再看',
),
),
@@ -444,7 +440,6 @@ class _PgcIntroPageState extends State<PgcIntroPage> {
icon: const Icon(FontAwesomeIcons.shareFromSquare),
onTap: () => introController.actionShareVideo(context),
selectStatus: false,
semanticsLabel: '转发',
text: NumUtils.numFormat(item.stat!.share),
),
],

View File

@@ -517,7 +517,6 @@ class _UgcIntroPanelState extends State<UgcIntroPanel> {
icon: const Icon(FontAwesomeIcons.thumbsUp),
selectIcon: const Icon(FontAwesomeIcons.solidThumbsUp),
selectStatus: introController.hasLike.value,
semanticsLabel: '点赞',
text: !isLoading
? NumUtils.numFormat(videoDetail.stat!.like)
: null,
@@ -533,7 +532,6 @@ class _UgcIntroPanelState extends State<UgcIntroPanel> {
introController.actionDislikeVideo,
),
selectStatus: introController.hasDislike.value,
semanticsLabel: '点踩',
text: "点踩",
),
),
@@ -544,7 +542,6 @@ class _UgcIntroPanelState extends State<UgcIntroPanel> {
selectIcon: const Icon(FontAwesomeIcons.b),
onTap: introController.actionCoinVideo,
selectStatus: introController.hasCoin,
semanticsLabel: '投币',
text: !isLoading
? NumUtils.numFormat(videoDetail.stat!.coin)
: null,
@@ -561,7 +558,6 @@ class _UgcIntroPanelState extends State<UgcIntroPanel> {
isLongPress: true,
),
selectStatus: introController.hasFav.value,
semanticsLabel: '收藏',
text: !isLoading
? NumUtils.numFormat(videoDetail.stat!.favorite)
: null,
@@ -574,7 +570,6 @@ class _UgcIntroPanelState extends State<UgcIntroPanel> {
onTap: () =>
introController.handleAction(introController.viewLater),
selectStatus: introController.hasLater.value,
semanticsLabel: '再看',
text: '再看',
),
),
@@ -582,7 +577,6 @@ class _UgcIntroPanelState extends State<UgcIntroPanel> {
icon: const Icon(FontAwesomeIcons.shareFromSquare),
onTap: () => introController.actionShareVideo(context),
selectStatus: false,
semanticsLabel: '分享',
text: !isLoading
? NumUtils.numFormat(videoDetail.stat!.share!)
: null,

View File

@@ -12,7 +12,6 @@ class ActionItem extends StatelessWidget {
this.onLongPress,
this.text,
this.selectStatus = false,
required this.semanticsLabel,
this.expand = true,
this.animation,
this.onStartTriple,
@@ -26,7 +25,6 @@ class ActionItem extends StatelessWidget {
final VoidCallback? onLongPress;
final String? text;
final bool selectStatus;
final String semanticsLabel;
final bool expand;
final Animation<double>? animation;
final VoidCallback? onStartTriple;
@@ -53,11 +51,8 @@ class ActionItem extends StatelessWidget {
children: [
AnimatedBuilder(
animation: animation!,
builder: (context, child) => Arc(
size: 28,
color: primary,
progress: -animation!.value,
),
builder: (context, child) =>
Arc(size: 28, color: primary, progress: -animation!.value),
),
child,
],
@@ -69,7 +64,7 @@ class ActionItem extends StatelessWidget {
child = Material(
type: .transparency,
child: InkWell(
borderRadius: const BorderRadius.all(Radius.circular(6)),
borderRadius: const .all(.circular(6)),
onTap: _isThumbsUp ? null : onTap,
onLongPress: _isThumbsUp ? null : onLongPress,
onSecondaryTap: PlatformUtils.isMobile || _isThumbsUp