title: I/flutter (12815): NoSuchMethodError: Class 'AuthResult' has no instance getter 'uid'
body: <p>i have an error to have the user's Id .</p>
  
  <p>the Code is:</p>
  
  <p>import 'package:cloud_firestore/cloud_firestore.dart';
      import 'package:flutter/cupertino.dart';</p>
  
  <pre><code>class UserManagement {
  
    Firestore db = Firestore.instance;
    var ui = db.currentUser();
  
    storeNewUser(user, context) {
      db.collection('/users').add({
      'email': 'thee',
      'uid': ui;
      }).then((value) {
        Navigator.pushNamed(context, 'Home');
      }).catchError((e) {
        print(e);
      });
    }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Kn3S5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kn3S5.png" alt="enter image description here"></a></p>