AutoDisposeStreamProvider rebuilds the widget tree and reinvoces itself endlessly. #1078
-
Describe the bug To Reproduce
It uses the follwoing repo:
Them I am watching this provider in my widget tree like this:
Expected behavior It feels like I am just using something wrong, if so please, point me into the right direction. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You're misusing providers. Providers should be global finals, not obtained from functions Something like |
Beta Was this translation helpful? Give feedback.
You're misusing providers. Providers should be global finals, not obtained from functions
Something like
getQuestionsList
is not reasonable and is the cause of your problem (since you're effectively creating a new provider everytimes).Instead make a global variable