title: Flutter & Firebase stream from certain type of data
body: <p>I'm trying to make an app with flutter and firebase. At the moment I have listings from the app displayed using a stream builder. I have a stream that displays all of the postings </p>
  
  <pre><code>Stream _streamAll = Firestore.instance.collection('postings').snapshots();
  </code></pre>
  
  <p>but I'm just trying to display postings by their categories. Two categories are Arts &amp; Culture and Sporting Events. I tried displaying only postings that were in the Sporting Events category like this </p>
  
  <pre><code> Stream _sportsStream = Firestore.instance.collection('postings').where(
    'type' == 'Sporting Events').snapshots();
  </code></pre>
  
  <p>but get this error </p>
  
  <p>════════ (2) Exception caught by widgets library ═══════════════════════════════════════════════════<br>
  Supported [field] types are [String] and [FieldPath].<br>
   'package:cloud_firestore/src/query.dart':<br>
  Failed assertion: line 131 pos 12: 'field is String || field is FieldPath' User-created ancestor of the error-causing widget was:<br>
  Scaffold [link to file where the problem occurs]</p>
  
  <p>Was hoping someone knew the fix to this.</p>
  
  <p>Categories are in my Firestore consle like this: </p>
  
  <p>Field: type<br>
  Type: string<br>
  Value: [myCategoryName]</p>
  
  <p><a href="https://i.stack.imgur.com/2NptQ.png" rel="nofollow noreferrer">image from firebase console on what I'm trying to get</a></p>
  
  <p>Thank you</p>