title: Get a single document from Firebase Firestore query with Flutter
body: <p>I know this might seem obvious, but I just can't find a way to do it..</p>
  <p>I am trying to get <strong>a single document</strong> from a firebase query. When I say a single document I mean <strong>not a stream</strong>.</p>
  <p>My approach so far is:</p>
  <pre><code>MyClass getDocument(String myQueryString) {
      return Firestore.instance.collection('myCollection').where(&quot;someField&quot;, isEqualTo: myQueryString) //This will almost certainly return only one document
          .snapshots().listen(
              (querySnapshot) =&gt; _myClassFromSnapshot(querySnapshot.documents[0])
      );
    }
  </code></pre>
  <p>However, I am getting the error <code>A value of type 'StreamSubscription&lt;QuerySnapshot&gt;' can't be returned from method 'getDocument' because it has a return type of 'MyClass'.</code></p>
  <p>Thanks!</p>