title: Getting specific data from a firebase collection in Flutter
body: <p>I have a Flutter app where I'm trying to get a specific data from Firebase a save it into a variable. In Firebase, I'm using Firestore Database and the structure of my database is like that:</p>
  <p><a href="https://i.stack.imgur.com/MnyM0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MnyM0.png" alt="enter image description here" /></a></p>
  <p>I'm trying to get the data using this method:</p>
  <pre><code>  void getItems() async {
      var test;
      FirebaseFirestore.instance
          .collection(&quot;userData&quot;)
          .doc(Constant.loginID)
          .get()
          .then((DocumentSnapshot doc) =&gt; print(doc.data()) );
    
    }
  </code></pre>
  <p>With this  code I get the data of a specific document and that is okay, however I get all the data of that document and I only want &quot;useItems&quot; data, How I can do it?</p>