mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
14 lines
337 B
Dart
14 lines
337 B
Dart
part of '../spotify.dart';
|
|
|
|
final relatedArtistsProvider = FutureProvider.autoDispose
|
|
.family<List<Artist>, String>((ref, artistId) async {
|
|
ref.cacheFor();
|
|
|
|
final spotify = ref.watch(spotifyProvider);
|
|
final artists = await spotify.invoke(
|
|
(api) => api.artists.relatedArtists(artistId),
|
|
);
|
|
|
|
return artists.toList();
|
|
});
|