Notifier.listenSelf Not Working ! #3848
-
I needed to listen to the provider itself, tried using ref.listenSelf in the build method and it will be deprecated in 3.0 version so i tried the Notifier.listenSelf method but it doesn't seem to work and doesn't prints anything where as the ref.listenSelf works. Need Help ! Here is the code :
|
Beta Was this translation helpful? Give feedback.
Answered by
charlescyt
Nov 23, 2024
Replies: 1 comment 1 reply
-
Instead of overriding @riverpod
class CategoryController extends _$CategoryController {
@override
Stream<List<Category>> build() {
listenSelf(...);
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
adilazhar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instead of overriding
listenSelf
, you invoke it directly inside the build method.