播放页部分调整,完整播放链路层级已打通
This commit is contained in:
@@ -4,7 +4,12 @@ import 'package:provider/provider.dart';
|
||||
import '../services/audio_service.dart';
|
||||
|
||||
class PlaylistPage extends StatelessWidget {
|
||||
const PlaylistPage({super.key});
|
||||
final VoidCallback onClose;
|
||||
|
||||
const PlaylistPage({
|
||||
super.key,
|
||||
required this.onClose,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -28,7 +33,7 @@ class PlaylistPage extends StatelessWidget {
|
||||
foregroundColor: Colors.white,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios_new),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
onPressed: onClose,
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
@@ -55,7 +60,7 @@ class PlaylistPage extends StatelessWidget {
|
||||
onPressed: () {
|
||||
service.clearQueue();
|
||||
Navigator.pop(context);
|
||||
Navigator.pop(context);
|
||||
onClose();
|
||||
},
|
||||
child: const Text(
|
||||
'清空',
|
||||
@@ -141,7 +146,7 @@ class PlaylistPage extends StatelessWidget {
|
||||
: null,
|
||||
onTap: () {
|
||||
service.setQueue(queue, startIndex: index);
|
||||
Navigator.pop(context);
|
||||
onClose();
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user