mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-05-08 16:24:36 +00:00
12 lines
379 B
Dart
12 lines
379 B
Dart
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:spotube/provider/spotify_provider.dart';
|
|
|
|
final albumsIsSavedProvider = FutureProvider.autoDispose.family<bool, String>(
|
|
(ref, albumId) async {
|
|
final spotify = ref.watch(spotifyProvider);
|
|
return spotify.me.containsSavedAlbums([albumId]).then(
|
|
(value) => value[albumId] ?? false,
|
|
);
|
|
},
|
|
);
|