title: Flutter platform error when querying for data
body: <p><img src="https://i.stack.imgur.com/qrzrK.png" alt="firebase database"></p>
  
  <p>Can I know how can I resolve this issue?</p>
  
  <p>Flutter - PlatformException : error, Invalid document reference. Document references must have an even number of segments, but users has 1, null</p>
  
  <p>The following is my code to query the name of my user.</p>
  
  <pre><code>class Auth {
    FirebaseUser mCurrentUser;
    FirebaseAuth auth;
    final firestoreInstance = Firestore.instance;
  
    String name = '';
    String uid = "";
  
    void getCurrentUser () async {
      mCurrentUser = await auth.currentUser();
      uid = mCurrentUser.uid;
      print(uid);
  
    }
  
  
  
    void getName1() async {
      if(uid != null){
        DocumentSnapshot document = await Firestore.instance.collection('User').document(uid).get();
        name =  document.data['Name'];
      }
  
    }
  </code></pre>