现阶段通知中心播放暂停切换功能已实现,但是上下一曲功能暂时消失,需要后续优化,这个commit是snapshot

This commit is contained in:
2026-08-21 22:58:44 +08:00
parent 94a4906671
commit 89c4ba8191
5 changed files with 201 additions and 156 deletions
+8 -8
View File
@@ -44,27 +44,27 @@ class PlaybackService {
}
// ---------- 控制 ----------
void pause() {
Future<void> pause() async {
if (_initialized && _player != null) {
_player!.pause();
await _player!.pause();
}
}
void resume() {
Future<void> resume() async {
if (_initialized && _player != null) {
_player!.play();
await _player!.play();
}
}
void stop() {
Future<void> stop() async {
if (_initialized && _player != null) {
_player!.stop();
await _player!.stop();
}
}
void seek(Duration position) {
Future<void> seek(Duration position) async {
if (_initialized && _player != null) {
_player!.seek(position);
await _player!.seek(position);
}
}