release: v1.6.0 - Live search, quality picker, dependency updates

This commit is contained in:
zarzet
2026-01-02 17:13:22 +07:00
parent 39bcc2c547
commit bd9b527161
8 changed files with 181 additions and 187 deletions
+9
View File
@@ -12,6 +12,7 @@ class TrackState {
final String? coverUrl;
final List<ArtistAlbum>? artistAlbums; // For artist page
final TrackState? previousState; // For back navigation
final bool hasSearchText; // For back button handling
const TrackState({
this.tracks = const [],
@@ -23,6 +24,7 @@ class TrackState {
this.coverUrl,
this.artistAlbums,
this.previousState,
this.hasSearchText = false,
});
bool get canGoBack => previousState != null;
@@ -40,6 +42,7 @@ class TrackState {
List<ArtistAlbum>? artistAlbums,
TrackState? previousState,
bool clearPreviousState = false,
bool? hasSearchText,
}) {
return TrackState(
tracks: tracks ?? this.tracks,
@@ -51,6 +54,7 @@ class TrackState {
coverUrl: coverUrl ?? this.coverUrl,
artistAlbums: artistAlbums ?? this.artistAlbums,
previousState: clearPreviousState ? null : (previousState ?? this.previousState),
hasSearchText: hasSearchText ?? this.hasSearchText,
);
}
}
@@ -222,6 +226,11 @@ class TrackNotifier extends Notifier<TrackState> {
state = const TrackState();
}
/// Set search text state for back button handling
void setSearchText(bool hasText) {
state = state.copyWith(hasSearchText: hasText);
}
/// Go back to previous state (if available)
bool goBack() {
if (state.previousState != null) {