create_flutter_provider_app icon indicating copy to clipboard operation
create_flutter_provider_app copied to clipboard

Question: where does uid come from?

Open cgrant opened this issue 3 years ago • 1 comments

Thought there was a lot of good stuff in this repo. I've been looking at this one line for a while and curious how it works. You stopped just short of explaining this in your medium article.

In this line databaseBuilder: (_, uid) => FirestoreDatabase(uid: uid), I understand that FirestoreDatabase takes a named parameter called uid, and that the value for that is coming from (_, uid). What I'm not following is where the uid for (_, uid) is actually created and emitted in the first place.

If you have any insights I would appreciate it.

Thanks!

https://github.com/KenAragorn/create_flutter_provider_app/blob/8479c6fef58e9f655e5d5668be3687a754a3b108/lib/main.dart#L34

cgrant avatar Dec 29 '20 00:12 cgrant

I might be wrong, but it seems that it's on the lib/auth_widget_builder.dart which is only called on lib/my_app.dart, meaning, from my understanding, that the only way the uid will update is to reboot the entire app. I'm waiting for an answer, here, meanwhile I've exhausted every explanation.

arturjnt avatar Sep 20 '21 10:09 arturjnt