register new user to my app using firestore in flutter code example
Example 1: firebase auth plugin
dependencies:
firebase_auth: ^0.18.3
Example 2: registration in flutter
onPressed: () async {
setState(() {
spooner = true;
});
try {
final newUser = await _auth.createUserWithEmailAndPassword(
email: email, password: password);
if (newUser != null) {
Navigator.pushNamed(context, ChatScreen.id);
}
setState(() {
spooner = false;
});
} catch (e) {
print(e);
}