spotube/lib/provider/custom_spotify_endpoint_provider.dart
2024-03-17 12:03:20 +06:00

11 lines
488 B
Dart

import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:spotube/provider/authentication_provider.dart';
import 'package:spotube/provider/spotify_provider.dart';
import 'package:spotube/services/custom_spotify_endpoints/spotify_endpoints.dart';
final customSpotifyEndpointProvider = Provider<CustomSpotifyEndpoints>((ref) {
ref.watch(spotifyProvider);
final auth = ref.watch(AuthenticationNotifier.provider);
return CustomSpotifyEndpoints(auth?.accessToken ?? "");
});