mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 19:28:27 +08:00
@@ -77,29 +77,33 @@ class BottomControl extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Obx(
|
||||
() => SizedBox(
|
||||
width: 35,
|
||||
height: 35,
|
||||
child: IconButton(
|
||||
tooltip: '弹幕开关',
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
() {
|
||||
final enableShowDanmaku =
|
||||
plPlayerController.enableShowDanmaku.value;
|
||||
return SizedBox(
|
||||
width: 35,
|
||||
height: 35,
|
||||
child: IconButton(
|
||||
tooltip: '弹幕开关',
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
),
|
||||
onPressed: () {
|
||||
final newVal = !enableShowDanmaku;
|
||||
plPlayerController.enableShowDanmaku.value = newVal;
|
||||
GStorage.setting
|
||||
.put(SettingBoxKey.enableShowDanmaku, newVal);
|
||||
},
|
||||
icon: Icon(
|
||||
size: 18,
|
||||
enableShowDanmaku
|
||||
? Icons.subtitles_outlined
|
||||
: Icons.subtitles_off_outlined,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
plPlayerController.enableShowDanmaku.value =
|
||||
!plPlayerController.enableShowDanmaku.value;
|
||||
GStorage.setting.put(SettingBoxKey.enableShowDanmaku,
|
||||
plPlayerController.enableShowDanmaku.value);
|
||||
},
|
||||
icon: Icon(
|
||||
size: 18,
|
||||
plPlayerController.enableShowDanmaku.value
|
||||
? Icons.subtitles_outlined
|
||||
: Icons.subtitles_off_outlined,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Obx(
|
||||
() => Container(
|
||||
|
||||
@@ -26,6 +26,7 @@ class LiveHeaderControl extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isFullScreen = plPlayerController.isFullScreen.value;
|
||||
return AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
foregroundColor: Colors.white,
|
||||
@@ -35,7 +36,7 @@ class LiveHeaderControl extends StatelessWidget {
|
||||
title: Row(
|
||||
spacing: 10,
|
||||
children: [
|
||||
if (plPlayerController.isFullScreen.value)
|
||||
if (isFullScreen)
|
||||
SizedBox(
|
||||
width: 35,
|
||||
height: 35,
|
||||
@@ -64,7 +65,7 @@ class LiveHeaderControl extends StatelessWidget {
|
||||
style: const TextStyle(
|
||||
fontSize: 15, height: 1, color: Colors.white),
|
||||
),
|
||||
if (plPlayerController.isFullScreen.value && upName != null)
|
||||
if (isFullScreen && upName != null)
|
||||
Text(
|
||||
upName!,
|
||||
maxLines: 1,
|
||||
@@ -93,31 +94,33 @@ class LiveHeaderControl extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => SizedBox(
|
||||
width: 35,
|
||||
height: 35,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
plPlayerController.onlyPlayAudio.value =
|
||||
!plPlayerController.onlyPlayAudio.value;
|
||||
onPlayAudio();
|
||||
},
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
() {
|
||||
final onlyPlayAudio = plPlayerController.onlyPlayAudio.value;
|
||||
return SizedBox(
|
||||
width: 35,
|
||||
height: 35,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
plPlayerController.onlyPlayAudio.value = !onlyPlayAudio;
|
||||
onPlayAudio();
|
||||
},
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
),
|
||||
icon: onlyPlayAudio
|
||||
? const Icon(
|
||||
size: 18,
|
||||
MdiIcons.musicCircle,
|
||||
color: Colors.white,
|
||||
)
|
||||
: const Icon(
|
||||
size: 18,
|
||||
MdiIcons.musicCircleOutline,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
icon: plPlayerController.onlyPlayAudio.value
|
||||
? const Icon(
|
||||
size: 18,
|
||||
MdiIcons.musicCircle,
|
||||
color: Colors.white,
|
||||
)
|
||||
: const Icon(
|
||||
size: 18,
|
||||
MdiIcons.musicCircleOutline,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
if (Platform.isAndroid)
|
||||
SizedBox(
|
||||
|
||||
Reference in New Issue
Block a user