Replies: 2 comments 1 reply
-
Simple answer: You can't. |
Beta Was this translation helpful? Give feedback.
-
Since you can't do that, you may acheive what you want by having a build method that returns a dummy value and have a method initialize(articleRequirements, aiOptions) that updates the provider state and that you call once in your main screen. Your provider must be kept alive somehow (either watched or listened to in the home screen or declared with keepAlive=true). |
Beta Was this translation helpful? Give feedback.
-
How can I access a family provider without passing values again after it has been initialized?
For example, on the
HomeScreen
, I initialize the provider like this:After initialization, I want to access the provider in any of the child widgets without having to pass the values again. Currently, I am passing the provider's properties through the
constructor
of all child widgets that need a reference tooutlineControllerProvider
.Beta Was this translation helpful? Give feedback.
All reactions