opt subtitle

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-28 16:34:58 +08:00
parent ad4fba4f44
commit d4ac9ab79a

View File

@@ -574,16 +574,14 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
), ),
...widget.videoDetailController!.subtitles ...widget.videoDetailController!.subtitles.indexed
.asMap() .map((e) {
.entries
.map((entry) {
return PopupMenuItem<int>( return PopupMenuItem<int>(
value: entry.key + 1, value: e.$1 + 1,
onTap: () => widget.videoDetailController! onTap: () => widget.videoDetailController!
.setSubtitle(entry.key + 1), .setSubtitle(e.$1 + 1),
child: Text( child: Text(
"${entry.value['lan_doc']}", "${e.$2['lan_doc']}",
style: const TextStyle(color: Colors.white), style: const TextStyle(color: Colors.white),
), ),
); );