title: How to fix Platform Exception: Invalid document reference. Document references must have an even number of segments
body: <p>I can successfully get username from the code below but I get this annoying exception (PlatformException(error, Invalid document reference. Document references must have an even number of segments, but users has 1, null)). Here's is the code</p>
  
  <pre><code>    DocumentSnapshot snapshot = await _firestoreRecord
       .collection('users')
       .document(userId)
       .get();
      return snapshot.data['username'];
  </code></pre>
  
  <p>I have tried doing <code>await _firestoreRecord.document('users/' + userId)</code> to no avail.</p>
  
  <p>Am I doing something wrong? Thanks</p>