opt: player control textStyle

This commit is contained in:
guozhigq
2024-12-09 09:50:00 +08:00
parent 03ac8bdd69
commit aae64dd6be
2 changed files with 9 additions and 33 deletions

View File

@ -1080,10 +1080,7 @@ class _HeaderControlState extends State<HeaderControl> {
if (videoIntroController.isShowOnlineTotal)
Text(
'${videoIntroController.total.value}人正在看',
style: const TextStyle(
color: Colors.white,
fontSize: 12,
),
style: textStyle,
),
const Spacer(),
Expanded(
@ -1094,18 +1091,12 @@ class _HeaderControlState extends State<HeaderControl> {
builder: (context, snapshot) {
if (snapshot.hasData) {
String currentTime = _formatTime(snapshot.data!);
return Text(
currentTime,
style: const TextStyle(fontSize: 12),
);
return Text(currentTime, style: textStyle);
} else if (snapshot.connectionState ==
ConnectionState.waiting) {
// 如果Stream还未发出数据先显示初始获取的时间
String currentTime = _formatTime(initialTime);
return Text(
currentTime,
style: const TextStyle(fontSize: 12),
);
return Text(currentTime, style: textStyle);
} else {
return const SizedBox();
}
@ -1156,7 +1147,8 @@ class _HeaderControlState extends State<HeaderControl> {
() => Marquee(
text: videoIntroController.videoDetail.value.title ??
'',
style: const TextStyle(fontSize: 16),
style: const TextStyle(
fontSize: 16, color: Colors.white),
scrollAxis: Axis.horizontal,
crossAxisAlignment: CrossAxisAlignment.center,
blankSpace: constraints.maxWidth,

View File

@ -292,10 +292,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
child: const Text(
'选集',
style: TextStyle(color: Colors.white, fontSize: 13),
),
child: const Text('选集', style: textStyle),
),
),
@ -310,14 +307,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
child: Obx(
() => Text(
_.videoFitDEsc.value,
style: const TextStyle(
color: Colors.white,
fontSize: 12,
fontWeight: FontWeight.bold,
),
),
() => Text(_.videoFitDEsc.value, style: textStyle),
),
),
),
@ -339,10 +329,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
height: 40,
padding: const EdgeInsets.only(left: 20),
value: speed,
child: Text(
'${speed}x',
style: textStyle.copyWith(fontWeight: FontWeight.bold),
),
child: Text('${speed}x', style: textStyle),
);
}).toList();
},
@ -352,10 +339,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
alignment: Alignment.center,
margin: const EdgeInsets.only(right: 4),
child: Obx(
() => Text(
'${_.playbackSpeed.toString()}x',
style: textStyle.copyWith(fontWeight: FontWeight.bold),
),
() => Text('${_.playbackSpeed.toString()}x', style: textStyle),
),
),
),