In a Flutter android app, users should authentificate with Firebase Phone Authentification, so, what I can't do is to save user entered data to cloud firestore like name and phone number in a node named "users".
I can do it with EmailAndPassword Authentification like this :
final FirebaseUser user =
(await firebaseAuth.createUserWithEmailAndPassword(
email: _mailTextController.text.trim(),
password: _passTextController.text.trim()))
.user;
firestore.collection('users').document(user.uid.toString()).setData({
'nom': _nomTextController.text.trim(),
'email': _mailTextController.text.trim(),
'userID': user.uid.toString()
});
Any help with PhoneAuthentification process