fix: 多行标题无障碍适配

This commit is contained in:
orz12
2024-03-02 08:45:18 +08:00
parent 8a9a16b288
commit b72c951389
2 changed files with 6 additions and 2 deletions

View File

@@ -189,7 +189,6 @@ class VideoContent extends StatelessWidget {
? Theme.of(context).colorScheme.primary ? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.onSurface, : Theme.of(context).colorScheme.onSurface,
), ),
semanticsLabel: i['text'] as String,
), ),
] ]
], ],

View File

@@ -80,7 +80,12 @@ class Utils {
semanticsLabel += '番剧,'; semanticsLabel += '番剧,';
} }
} }
semanticsLabel += '${videoItem.title}'; if (videoItem.title is String) {
semanticsLabel += videoItem.title;
} else {
semanticsLabel += videoItem.title.map((e) => e['text'] as String).join('');
}
if (!emptyStatCheck(videoItem.stat.view)) { if (!emptyStatCheck(videoItem.stat.view)) {
semanticsLabel += ',${Utils.numFormat(videoItem.stat.view)}'; semanticsLabel += ',${Utils.numFormat(videoItem.stat.view)}';
semanticsLabel += semanticsLabel +=