listenSelf in Provider and FutureProvider #3900
-
@riverpod
AuthTokens? authTokens(AuthTokensRef ref) {
ref.listenSelf(ref.read(authTokenListenerProvider).authTokenListener);
return api.authTokens;
} Is there a way to use Maybe another solution to use a @riverpod
AuthTokens? authTokens(AuthTokensRef ref) {
return ref.watch(_myNotifierNotifierProvider);
} Is it a good idea ? Thank you for your help |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
listenSelf is Notifier-specific now. So you have to change Provider/FutureProvider in their Notifier equivalent. There are some upcoming features for testing notifiers. |
Beta Was this translation helpful? Give feedback.
listenSelf is Notifier-specific now. So you have to change Provider/FutureProvider in their Notifier equivalent.
There are some upcoming features for testing notifiers.