test通道确认功能完整
libmpv.so(LGPL版本) SHA256 = E56776A1BA03892C9A037A534A7114BA54F6EE202083A706CF878924BAA9D7AA
This commit is contained in:
@@ -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),
|
||||
|
||||
+10
-2
@@ -284,10 +284,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc"
|
||||
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.7.2"
|
||||
version: "0.6.7"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -352,6 +352,14 @@ packages:
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.6"
|
||||
media_kit_libs_android_audio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: media_kit_libs_android_audio
|
||||
sha256: "8f8f9759e537e12d66f08bc4d5279eb1bb21a0ccc519ff3442c68a9f3b6dd68b"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.8"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@ environment:
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
media_kit: ^1.2.6
|
||||
#media_kit_libs_audio: ^1.0.7
|
||||
media_kit: 1.2.6
|
||||
media_kit_libs_android_audio: 1.3.8
|
||||
shared_preferences: 2.2.2
|
||||
provider: ^6.1.2
|
||||
dio: ^5.4.0 # HTTP 客户端
|
||||
|
||||
Reference in New Issue
Block a user