mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-05-09 00:34:36 +00:00
13 lines
386 B
Dart
13 lines
386 B
Dart
part of '../spotify.dart';
|
|
|
|
final artistTopTracksProvider = FutureProviderFamily<List<Track>, String>(
|
|
(ref, artistId) async {
|
|
final spotify = ref.watch(spotifyProvider);
|
|
final market = ref
|
|
.watch(userPreferencesProvider.select((s) => s.recommendationMarket));
|
|
final tracks = await spotify.artists.topTracks(artistId, market);
|
|
|
|
return tracks.toList();
|
|
},
|
|
);
|