页面层级与返回逻辑实现完成,并且去掉web相关代码支持
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
// lib/pages/playlist_page.dart
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../services/audio_service.dart';
|
||||
|
||||
class PlaylistPage extends StatelessWidget {
|
||||
final VoidCallback onClose;
|
||||
|
||||
const PlaylistPage({
|
||||
super.key,
|
||||
required this.onClose,
|
||||
});
|
||||
const PlaylistPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -33,7 +27,7 @@ class PlaylistPage extends StatelessWidget {
|
||||
foregroundColor: Colors.white,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios_new),
|
||||
onPressed: onClose,
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
@@ -60,7 +54,7 @@ class PlaylistPage extends StatelessWidget {
|
||||
onPressed: () {
|
||||
service.clearQueue();
|
||||
Navigator.pop(context);
|
||||
onClose();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: const Text(
|
||||
'清空',
|
||||
@@ -146,7 +140,7 @@ class PlaylistPage extends StatelessWidget {
|
||||
: null,
|
||||
onTap: () {
|
||||
service.setQueue(queue, startIndex: index);
|
||||
onClose();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user