fix(flutter): 播放页改为透明叠层

This commit is contained in:
Zhou Weidong committed 2026-10-20 11:29:02 +08:00
1 parent d762511412
commit 0af68f2455
5 files changed
+60 -50

No files matched your search

+11 -17
View File
@@ -16,7 +16,9 @@ const double _topButtonSize = 36;
const double _topBarHeight = 58;
const double _railButtonSize = 34;
const double _railGap = 18;
const double _panelRadius = 16;
const List<Shadow> _playerTextShadows = [
Shadow(color: Colors.black54, blurRadius: 5, offset: Offset(0, 1)),
];
/// K29 竖屏播放页浮层。
class PlayerPlaybackOverlay extends StatelessWidget {
@@ -86,13 +88,6 @@ class PlayerPlaybackOverlay extends StatelessWidget {
key: const Key('player-controls-top'),
height: _topBarHeight,
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0xCC000000), Color(0x00000000)],
),
),
child: Row(
children: [
if (actions.onBack != null)
@@ -115,6 +110,7 @@ class PlayerPlaybackOverlay extends StatelessWidget {
color: AppColors.onPrimary,
fontSize: 15,
fontWeight: FontWeight.w700,
shadows: _playerTextShadows,
),
),
),
@@ -163,16 +159,9 @@ class PlayerPlaybackOverlay extends StatelessWidget {
left: 0,
right: 0,
bottom: 0,
child: Container(
child: Padding(
key: const Key('player-controls-bottom'),
padding: const EdgeInsets.fromLTRB(14, 8, 14, 6),
decoration: const BoxDecoration(
color: AppColors.playerPanel,
border: Border(top: BorderSide(color: AppColors.playerDivider)),
borderRadius: BorderRadius.vertical(
top: Radius.circular(_panelRadius),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -226,6 +215,7 @@ class PlayerPlaybackOverlay extends StatelessWidget {
fontFamily: 'Outfit',
fontSize: 18 * data.textScale,
fontWeight: FontWeight.w800,
shadows: _playerTextShadows,
),
),
),
@@ -234,6 +224,7 @@ class PlayerPlaybackOverlay extends StatelessWidget {
Icons.chevron_right_rounded,
color: AppColors.playerMuted,
size: 20,
shadows: _playerTextShadows,
),
],
),
@@ -247,7 +238,8 @@ class PlayerPlaybackOverlay extends StatelessWidget {
children: [
Expanded(
child: Material(
color: AppColors.playerChip,
key: const Key('player-episodes-pill'),
color: AppColors.playerOverlayPill,
borderRadius: BorderRadius.circular(999),
clipBehavior: Clip.antiAlias,
child: InkWell(
@@ -272,6 +264,7 @@ class PlayerPlaybackOverlay extends StatelessWidget {
color: AppColors.onPrimary,
fontSize: 11,
fontWeight: FontWeight.w700,
shadows: _playerTextShadows,
),
),
),
@@ -280,6 +273,7 @@ class PlayerPlaybackOverlay extends StatelessWidget {
Icons.keyboard_arrow_up_rounded,
color: AppColors.onPrimary,
size: 16,
shadows: _playerTextShadows,
),
],
),
@@ -55,6 +55,7 @@ class _SpeedEntry extends StatelessWidget {
Icons.speed_rounded,
color: AppColors.onPrimary,
size: 15,
shadows: _playerTextShadows,
),
const SizedBox(width: 4),
Text(
@@ -63,6 +64,7 @@ class _SpeedEntry extends StatelessWidget {
color: AppColors.onPrimary,
fontSize: 12,
fontWeight: FontWeight.w700,
shadows: _playerTextShadows,
),
),
],
@@ -93,7 +95,7 @@ class _BottomIconButton extends StatelessWidget {
tooltip: tooltip,
padding: EdgeInsets.zero,
style: IconButton.styleFrom(
backgroundColor: AppColors.playerChip,
backgroundColor: AppColors.playerOverlayPill,
foregroundColor: AppColors.onPrimary,
),
onPressed: onPressed,
@@ -252,16 +254,20 @@ class _EpisodeSynopsisState extends State<_EpisodeSynopsis> {
widget.l10n.episodeLabel(widget.episodeNumber),
key: const Key('player-episode-label'),
style: TextStyle(
color: AppColors.blue,
color: AppColors.onPrimary,
fontSize: 11 * widget.textScale,
fontWeight: FontWeight.w700,
shadows: _playerTextShadows,
),
),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 6),
child: Text(
'|',
style: TextStyle(color: AppColors.playerDivider),
style: TextStyle(
color: Colors.white54,
shadows: _playerTextShadows,
),
),
),
Expanded(
@@ -274,6 +280,7 @@ class _EpisodeSynopsisState extends State<_EpisodeSynopsis> {
color: AppColors.playerMuted,
fontSize: 11 * widget.textScale,
height: 1.35,
shadows: _playerTextShadows,
),
),
),
@@ -284,6 +291,7 @@ class _EpisodeSynopsisState extends State<_EpisodeSynopsis> {
: Icons.keyboard_arrow_down_rounded,
color: AppColors.playerMuted,
size: 16,
shadows: _playerTextShadows,
),
],
),
@@ -295,6 +303,7 @@ class _EpisodeSynopsisState extends State<_EpisodeSynopsis> {
style: const TextStyle(
color: AppColors.playerMuted,
fontSize: 10,
shadows: _playerTextShadows,
),
),
],