title: How to correctly fetch data from firebase using where clauses and custom filters from firebase using flutter
body: <p>Im trying to fetch data using</p>
  <pre><code>Stream&lt;List&lt;User&gt;&gt; getUsers(User user) {
      return _firebaseFirestore
          .collection('users')
          // .where('interestedIn', isEqualTo: _selectInterest(user))
          .snapshots()
          .map((snap) {
        return snap.docs.map((doc) =&gt; User.fromSnapshot(doc)).toList();
      });
    }
  </code></pre>
  <p>The filter used in the where clause is as follows</p>
  <pre><code>  _selectInterest(User user) {
      if (user.interestPreference == null) {
        return ['HIRING', 'WORK'];
      }
      return user.interestPreference;
    }
  </code></pre>
  <p>In firebase I store interestPreference as an Array with 'HIRING' as the only element in the current user's data, when I try to fetch users with 'HIRING' in their interestedIn which is a string I dont get any data. But when I hardcode the where clause as</p>
  <pre><code>.where('interestedIn', isEqualTo: 'HIRING')
  </code></pre>
  <p>I get the data, Can anyone help me solve my dilemma?</p>