have a problem that I'm sitting on couple of days now. have an app where:
depending of AUTH state, 'LoginScreen' or 'MainScreen' is Shown.
in MainScreen I setUp bottomNavigation with screens (HomeScreen, ShoppingScreen,MyFavorites)
- I set up there as well my StreamProviders(those depend on Auth) by using MultiProvider
- on HomeScreen when I User Provider.of(context) it works like it should
but when I use :
`Navigator.push( context, MaterialPageRoute( builder: (_) => ProfileScreen(), ), );
` and use Provider.of(context) there I get "Could not find correct Provider....above this...widget"
I read some issues on that and solution there was to decler providers above MaterailApp which in my case I can not do because I can set up thoese only after Auth is successfull.
Tryed passing context(from HomeScreen) to ProfileScreen(through constructor) and that work but when value changed of UserData it did not update the screen (guessing beacause of diffrent 'contexts')
What am I doing wrong in here,any Ideas?:S