spotube/lib/provider/spotify/artist/related.dart

12 lines
307 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.artists.relatedArtists(artistId);
return artists.toList();
});