暂时把bug先处理掉了,准备尝试实现最小播放目标
This commit is contained in:
@@ -8,7 +8,9 @@ class MiniPlayerBar extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final service = context.watch<AudioService>();
|
||||
final song = service.currentSong!;
|
||||
final song = service.currentSong;
|
||||
|
||||
if (song == null) return const SizedBox.shrink();
|
||||
|
||||
return Container(
|
||||
height: 64,
|
||||
@@ -21,7 +23,6 @@ class MiniPlayerBar extends StatelessWidget {
|
||||
offset: const Offset(0, -4),
|
||||
),
|
||||
],
|
||||
// 顶部微渐变(轻阴影)
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
@@ -35,7 +36,6 @@ class MiniPlayerBar extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
const SizedBox(width: 12),
|
||||
// 封面占位(56px)
|
||||
Container(
|
||||
width: 48,
|
||||
height: 48,
|
||||
@@ -47,7 +47,6 @@ class MiniPlayerBar extends StatelessWidget {
|
||||
const Icon(Icons.music_note, color: Colors.white38, size: 24),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
// 歌曲信息
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -75,7 +74,6 @@ class MiniPlayerBar extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
// 控制按钮
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
service.isPlaying ? Icons.pause : Icons.play_arrow,
|
||||
|
||||
Reference in New Issue
Block a user