Reputation: 6082
Simple question for provider.
I have one screen name is intro.dart, it has 3 widgets in the widget tree. Suppose widget "A", "B" and "C" all are stateLess
widget. I'm using 'Provider' package. My question is, I just want to call method of "A" widget while clicked on on button of "C" widget. how can I do by provider or Any other easy trick?
Upvotes: 0
Views: 91
Reputation: 1459
Well, that's impossible or at least wrongly designed. You are trying to violate the widget encapsulation and make them directly dependent.
Depends on what exactly you want to achieve that should do the trick:
If it doesn't solve your current situation - please update the question with exact problem you are facing.
Upvotes: 1