mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: 无障碍自定义操作适配
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../models/model_rec_video_item.dart';
|
||||
@@ -127,10 +128,16 @@ class VideoCardV extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String heroTag = Utils.makeHeroTag(videoItem.id);
|
||||
List<VideoCustomAction> actions =
|
||||
VideoCustomActions(videoItem, context).actions;
|
||||
return Stack(children: [
|
||||
Semantics(
|
||||
label: Utils.videoItemSemantics(videoItem),
|
||||
excludeSemantics: true,
|
||||
customSemanticsActions: <CustomSemanticsAction, void Function()>{
|
||||
for (var item in actions)
|
||||
CustomSemanticsAction(label: item.title): item.onTap!,
|
||||
},
|
||||
child: Card(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
margin: EdgeInsets.zero,
|
||||
@@ -185,7 +192,7 @@ class VideoCardV extends StatelessWidget {
|
||||
child: VideoPopupMenu(
|
||||
size: 29,
|
||||
iconSize: 17,
|
||||
videoItem: videoItem,
|
||||
actions: actions,
|
||||
)),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user