flutter firestore not woking after page refresh

Job ID: 34272503

Budget: €30 – €250 EUR

Hey,

i need some help for my flutter web project:

1) i fetch 2 data points from firestore during initstate. i need those 2 data for my futurbuilder/to fetch api, because i store the user id in firestore and need the user id for the api post request.
2) im also fetching general data from firestore in my stateful widget.

now, when i refresh the page, all data from firebase is missing. no api working anymore, and general data is fetched by firestore (streambuilder).

I was thinking to put all data from firebase subscription in initstate to sharedPrefeences. but i think there must be a better way
Related categories: HTML Dart Flutter