fix: 未开启自动播放时弹幕开关异常
This commit is contained in:
@ -404,26 +404,40 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
width: 38,
|
width: 38,
|
||||||
height: 38,
|
height: 38,
|
||||||
child: Obx(
|
child: Obx(
|
||||||
() => IconButton(
|
() => !vdCtr.isShowCover.value
|
||||||
|
? IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
plPlayerController?.isOpenDanmu.value =
|
plPlayerController?.isOpenDanmu.value =
|
||||||
!(plPlayerController?.isOpenDanmu.value ??
|
!(plPlayerController
|
||||||
|
?.isOpenDanmu.value ??
|
||||||
false);
|
false);
|
||||||
},
|
},
|
||||||
icon: !(plPlayerController?.isOpenDanmu.value ??
|
icon:
|
||||||
|
!(plPlayerController?.isOpenDanmu.value ??
|
||||||
false)
|
false)
|
||||||
? SvgPicture.asset(
|
? SvgPicture.asset(
|
||||||
'assets/images/video/danmu_close.svg',
|
'assets/images/video/danmu_close.svg',
|
||||||
// ignore: deprecated_member_use
|
// ignore: deprecated_member_use
|
||||||
color:
|
color: Theme.of(context)
|
||||||
Theme.of(context).colorScheme.outline,
|
.colorScheme
|
||||||
|
.outline,
|
||||||
)
|
)
|
||||||
: SvgPicture.asset(
|
: SvgPicture.asset(
|
||||||
'assets/images/video/danmu_open.svg',
|
'assets/images/video/danmu_open.svg',
|
||||||
// ignore: deprecated_member_use
|
// ignore: deprecated_member_use
|
||||||
color:
|
color: Theme.of(context)
|
||||||
Theme.of(context).colorScheme.primary,
|
.colorScheme
|
||||||
|
.primary,
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
: IconButton(
|
||||||
|
icon: SvgPicture.asset(
|
||||||
|
'assets/images/video/danmu_close.svg',
|
||||||
|
// ignore: deprecated_member_use
|
||||||
|
color:
|
||||||
|
Theme.of(context).colorScheme.outline,
|
||||||
|
),
|
||||||
|
onPressed: () {},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user