notificationsDataSourceProvider top-level property
final
Provides the current NotificationsDataSource
instance.
Implementation
final notificationsDataSourceProvider = Provider<NotificationsDataSource>(
(ref) {
final apiService = ref.watch(apiServiceProvider);
final token = ref.watch(userTokenProvider);
if (!token.hasValue) return TokenUnavailableNotificationsDataSource();
return StdNotificationsDataSource(apiService, token.requireValue);
},
);