1

Now I have developed an app in Flutter and also added firebase_auth now what I want is that each user when is logged in could set a value to a variable, let's say variable your Phone Number which every user has to set once they log in not I want to ask if the user logs in another device how am I gonna make sure the variable Phone Number is same as he set in the other device.

I know that I could store that data locally using SQL or sharedpreferences but in firebase how should I do?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Ashu
  • 97
  • 2
  • 11

1 Answers1

1

The typical approach is to create a Users collection. Every user that signs up will have a dedicated document (in the Users collection) for you to store other data related to that user; you can use the UID provided by firebase_auth for the documentID to make it easier to reference.

VLXU
  • 719
  • 5
  • 11