Closed sercheo87 closed 4 years ago
I found difference when use provider: ^2.0.1
run without problems but use provider: ^4.0.4
is the problem the model not set value user id.
Aaah, nice catch. You might have to handle your initial data different then. Check if there's updated docs and follow that from the provider readme
I followed your tutorials to build an app same architecture as this the youtube tutorials. the issue I'm having is on app startup the provider.of<User>(context)
is null. Though I'm managing that with a loader it throws the error on emulator.
I found the issues it got to do with lazy loading of the create callback of provider in version 4, I just pass lazy: false
to the provider.
same too happen in me how solve that?My first time id is zero Please point me thanks.
In the tutorial @FilledStacks used initial value in the user model which is passed to the provider in the first load. You don't necessarily need the initial values, so comment or take them out.
@heinzan there's two solutions above your comment I hope you tried both. Update version to latest and set lazy to false.
Hi, I has a problem when run Final example not load post because is produced by
Provider.of<User>(context).id
in file home_view.dart has 0 on first run.