FilledStacks / flutter-tutorials

The repo contains the source code for all the tutorials on the FilledStacks Youtube channel.
MIT License
4.75k stars 1.76k forks source link

InheretedWidgets #63

Closed Aljulanda9 closed 4 years ago

Aljulanda9 commented 4 years ago

Hello! Thanks a lot for the tutorial. I built my app following your provider architecture and it's been amazing.

Just wanted to ask you about the recommended way of accessing data from a parent widget in this architecture. Passing arguments through constructors from a parent to child doesn't seem to be as efficient as using say an InheritedWidget. How can we use something like inheretedWidget with your provider architecture?

Again thanks a lot for your amazing tutorials!

FilledStacks commented 4 years ago

Hi, you're welcome :)

Provider is a better version of inherited widget so I would pass the values using a provider like we do in the responsive ui tutorials.