1
the await _auth.createUserWithEmailAndPassword(email: email, password: password) will return an UserCredential object, which it will never be null, so making an if else condition over it doesn't do anything really since the newUser != null will always equals to true. the piece of code you wrote ...