title: Flutter - firebase_auth updateProfile method is not working
body: <p>I'm creating app using Flutter with Firebase. I have some weird issues. I'm creating authentication and it is working fine but when i try to add some collections to my Firestore Database, the record of displayName is set to null.</p>
  
  <pre><code>Future&lt;FirebaseUser&gt; createUser(email, password, displayName) async {
      final FirebaseUser user = await _auth.createUserWithEmailAndPassword(
          email: email, password: password);
  
      UserUpdateInfo info = new UserUpdateInfo();
      info.displayName = displayName;
      _auth.updateProfile(info);
  
      Firestore.instance.collection('users').document().setData({
        'name': user.displayName,
        'uid': user.uid,
        'email': user.email,
        'isEmailVerified': user.isEmailVerified,
        'photoUrl': user.photoUrl,
      });
  
      return user;
    } 
  </code></pre>
  
  <p>this is Future class that creates user.</p>
  
  <pre><code>void _handleSubmitted() {
      userAuth
          .createUser(
          emailController.text, passwordController.text, nameController.text)
          .then((onValue) {
        print("Sign Up button clicked: $onValue");
  
      });
    }
  </code></pre>
  
  <p>this method is handle when sign up button is clicked. </p>
  
  <p>and collection looks like this picture.</p>
  
  <p><a href="https://i.stack.imgur.com/rWtJA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rWtJA.png" alt="collection"></a></p>