feat(player): swipe the mini player away to stop playback

Horizontal Dismissible on the bar; stop() now also clears the current
media item so the bar (and any listener of it) sees the session end.
This commit is contained in:
zarzet
2026-07-14 09:10:15 +07:00
parent 8966de6d0a
commit 7573d360bf
2 changed files with 106 additions and 74 deletions
+2
View File
@@ -580,6 +580,8 @@ class MusicPlayerHandler extends BaseAudioHandler
_userPaused = false;
_recent.clear();
_playHistory.clear();
// A stopped session has no current item; this also hides the mini player.
mediaItem.add(null);
_broadcastState(playerState: PlayerState.stopped);
await super.stop();
}