opt: 字幕按钮显隐逻辑
This commit is contained in:
@ -30,6 +30,7 @@ class HeaderControl extends StatefulWidget implements PreferredSizeWidget {
|
||||
this.floating,
|
||||
this.bvid,
|
||||
this.videoType,
|
||||
this.showSubtitleBtn,
|
||||
super.key,
|
||||
});
|
||||
final PlPlayerController? controller;
|
||||
@ -37,6 +38,7 @@ class HeaderControl extends StatefulWidget implements PreferredSizeWidget {
|
||||
final Floating? floating;
|
||||
final String? bvid;
|
||||
final SearchType? videoType;
|
||||
final bool? showSubtitleBtn;
|
||||
|
||||
@override
|
||||
State<HeaderControl> createState() => _HeaderControlState();
|
||||
@ -1327,14 +1329,15 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
],
|
||||
|
||||
/// 字幕
|
||||
ComBtn(
|
||||
icon: const Icon(
|
||||
Icons.closed_caption_off,
|
||||
size: 22,
|
||||
color: Colors.white,
|
||||
if (widget.showSubtitleBtn!)
|
||||
ComBtn(
|
||||
icon: const Icon(
|
||||
Icons.closed_caption_off,
|
||||
size: 22,
|
||||
color: Colors.white,
|
||||
),
|
||||
fuc: () => showSubtitleDialog(),
|
||||
),
|
||||
fuc: () => showSubtitleDialog(),
|
||||
),
|
||||
SizedBox(width: buttonSpace),
|
||||
Obx(
|
||||
() => SizedBox(
|
||||
|
Reference in New Issue
Block a user