test通道确认功能完整

libmpv.so(LGPL版本)
SHA256 = E56776A1BA03892C9A037A534A7114BA54F6EE202083A706CF878924BAA9D7AA
This commit is contained in:
2026-08-30 23:57:24 +08:00
parent 21a1ad1d05
commit 08ea8a4508
3 changed files with 19 additions and 17 deletions
+7 -13
View File
@@ -2,7 +2,6 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../services/audio_service.dart';
import '../main.dart';
class GlobalMiniPlayer extends StatelessWidget {
const GlobalMiniPlayer({super.key});
@@ -13,7 +12,6 @@ class GlobalMiniPlayer extends StatelessWidget {
final isPlaying = context.select<AudioService, bool>((s) => s.isPlaying);
final bottomPadding = MediaQuery.of(context).padding.bottom;
// 如果没有歌曲,不显示
if (song == null) {
return const SizedBox.shrink();
}
@@ -21,7 +19,6 @@ class GlobalMiniPlayer extends StatelessWidget {
return Stack(
clipBehavior: Clip.none,
children: [
// 背景条
Positioned(
left: 0,
right: 0,
@@ -31,7 +28,6 @@ class GlobalMiniPlayer extends StatelessWidget {
color: const Color(0xFF1A1F1E),
),
),
// 主内容
Positioned(
left: 0,
right: 0,
@@ -44,21 +40,21 @@ class GlobalMiniPlayer extends StatelessWidget {
height: 60,
color: const Color(0xFF1A1F1E),
child: ClipRRect(
// ⭐ 修复涟漪圆角问题
borderRadius: BorderRadius.circular(12),
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: () {
navigatorKey.currentState?.pushNamed('/player');
// ⭐ 使用 Navigator.of(context) 替代 navigatorKey
Navigator.of(context).pushNamed('/player');
},
highlightColor: Colors.white.withOpacity(0.05),
splashColor: Colors.white.withOpacity(0.1),
// ⭐ 替换弃用的 withOpacity 为 withValues
highlightColor: Colors.white.withValues(alpha: 0.05),
splashColor: Colors.white.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
child: Row(
children: [
const SizedBox(width: 12),
// 封面图
Container(
width: 44,
height: 44,
@@ -81,7 +77,6 @@ class GlobalMiniPlayer extends StatelessWidget {
: null,
),
const SizedBox(width: 12),
// 标题 + 艺术家
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -111,7 +106,6 @@ class GlobalMiniPlayer extends StatelessWidget {
],
),
),
// 播放/暂停按钮
IconButton(
icon: Icon(
isPlaying ? Icons.pause : Icons.play_arrow,
@@ -122,7 +116,6 @@ class GlobalMiniPlayer extends StatelessWidget {
context.read<AudioService>().togglePlay();
},
),
// 播放列表按钮
IconButton(
icon: const Icon(
Icons.playlist_play_outlined,
@@ -130,7 +123,8 @@ class GlobalMiniPlayer extends StatelessWidget {
size: 24,
),
onPressed: () {
navigatorKey.currentState?.pushNamed('/playlist');
// ⭐ 使用 Navigator.of(context)
Navigator.of(context).pushNamed('/playlist');
},
),
const SizedBox(width: 4),