title: Get User Group/Post data with Streams
body: <p>Here is what I am using:</p>
  <ol>
  <li>Firebase Realtime database.</li>
  <li>Provider Architecture.</li>
  <li>Multiprovider with StreamProviders</li>
  <li>Flutter (of course)</li>
  </ol>
  <p>I have already set up an architecture using Provider where I get the user data (profile) from database, and it is able to update because of Streams.</p>
  <h2>The Problem</h2>
  <p>The <code>User</code> class has a property called <strong>groups</strong> of type <code>List&lt;String&gt;?</code> where I store the group ID's that belong to him (imagine a messaging app)</p>
  <p>I then want to filter the Firebase RTDB to get, for example, only those groups and store them with a Stream Provider. I would be able to manage them locally, as with everything with provider, as they update if any change occurs on the server side.</p>
  <p>However, I know that a RTDB query cannot have multiple conditions (such as looking for 3 specific group ID's at once), so I cannot make a Stream out of this data.</p>
  <h2><strong>Here is what I would be looking for</strong></h2>
  <p><code>UserData StreamProvider</code> (which I already have) --&gt; pass group id's --&gt;  <code>UserGroups StreamProvider </code> (which gets only the groups I need from the database and stores them as a stream).</p>
  <h2>Things I have Considered</h2>
  <ul>
  <li>Changing to another architecture (Bloc, etc.)</li>
  <li>Loading all the groups and filtering from flutter, using lists. (Would consume a lot of resources.</li>
  <li>Generate separate streams for each group that is loaded (would not know how to do this).</li>
  <li>Changing to Firestore, which has more documentation on the matter.</li>
  <li>Breaking my computer, multiple times.</li>
  </ul>
  <h2>Summary Question</h2>
  <p>If this is not the way, which is the most efficient manner to handle/filter Firebase RTDB in realtime and with streams, so that the user has minimal loading times and things are updated automatically.</p>