title: Error: A value of type 'AuthResult' can't be assigned to a variable of type 'FirebaseUser'
body: <p>I am working on a chat app and want to allow users to register using email and password. For some reason, I am getting the error below - is this implementation incorrect? I am not sure why i am getting "Error: A value of type 'AuthResult' can't be assigned to a variable of type 'FirebaseUser'."</p>
  
  <pre><code>class _RegistrationState extends State&lt;Registration&gt; {
    String email;
    String password;
  
    final FirebaseAuth _auth = FirebaseAuth.instance;
  
    Future&lt;void&gt; registerUser() async {
      FirebaseUser user = await _auth.createUserWithEmailAndPassword(
          email: email,
          password: password,
      );
  </code></pre>