mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
15 lines
401 B
Dart
15 lines
401 B
Dart
part of '../spotify.dart';
|
|
|
|
final artistTopTracksProvider =
|
|
FutureProvider.autoDispose.family<List<Track>, String>(
|
|
(ref, artistId) async {
|
|
ref.cacheFor();
|
|
|
|
final spotify = ref.watch(spotifyProvider);
|
|
final market = ref.watch(userPreferencesProvider.select((s) => s.market));
|
|
final tracks = await spotify.artists.topTracks(artistId, market);
|
|
|
|
return tracks.toList();
|
|
},
|
|
);
|