I am creating a flutter app using dart language with Firebase for authentication.
My code for a user signing up is
Future<void> signUp() async {
if(_formKey.currentState.validate()){
_formKey.currentState.save();
try{
AuthResult user = await FirebaseAuth.instance.createUserWithEmailAndPassword(email: _email, password: _password);
Navigator.of(context).pop();
Navigator.pushReplacement(context,MaterialPageRoute(builder: (context)=> LoginPage()));
}catch(e){
print(e.message);
}
Does anyone know how I would use that newly created users credentials to create an entry in the database for user?
I have set up the database with a dummy user which I manually entered but would like to be able to create entries from a user signing up.