title: Avoid StreamBuilder refreshing running SetState in Flutter
body: <p>I have a page which displays 2 elements, both of them are different <code>StreamBuilder</code> but the second one depends on the first one.
  To make it more clear I display this:</p>
  
  <pre><code>Firebase documents (list)
  Firebase user
  </code></pre>
  
  <p>If we sign out both <code>StreamBuilder</code> disappear. That's fine, but my problem comes when I need to select a document from the list:</p>
  
  <pre><code>return ListTile(
  leading: FlutterLogo(size: 40.0),
  title: Text(set["title"]),
  selected: _selected[index],
  trailing: Badge(
     badgeColor: Colors.grey,
     shape: BadgeShape.circle,
     toAnimate: true,
  onTap: () =&gt; setState(() =&gt; _selected[index] = !_selected[index]),
  );                     
  </code></pre>
  
  <p>Everytime I do the <code>SetState()</code> I refresh the first <code>StreamBuilder</code> (not sure why) and with this the second one.</p>
  
  <p>This is the list widget:</p>
  
  <pre><code>Widget _mySetsLists(BuildContext context) {
      List&lt;bool&gt; _selected = List.generate(20, (i) =&gt; false);
  
      return StreamBuilder(
        stream: FirebaseAuth.instance.onAuthStateChanged,
        builder: (context, snapshot) {
          FirebaseUser user = snapshot.data;
          if (snapshot.hasData) {
            return StreamBuilder(
              stream: Firestore.instance
                  .collection('users')
                  .document(user.uid)
                  .collection('sets')
                  .snapshots(),
              builder: (BuildContext context, AsyncSnapshot snapshot) {
                if (snapshot.hasData) {
                  return new ListView.builder(
                    shrinkWrap: true,
                    itemCount: snapshot.data.documents.length,
                    itemBuilder: (context, index) {
                      DocumentSnapshot set = snapshot.data.documents[index];
                      return ListTile(
                        leading: FlutterLogo(size: 40.0),
                        title: Text(set["title"]),
                        selected: _selected[index],
                        onTap: () =&gt; setState(() =&gt; _selected[index] = !_selected[index]),
                      );
                    },
                  );
                } else {
                  return Center(
                    child: new CircularProgressIndicator(),
                  );
                }
              },
            );
          } else {
            return Text("loadin");
          }
        },
      );
    }
  }
  </code></pre>
  
  <p>And this is the user profile:</p>
  
  <pre><code>class UserProfileState extends State&lt;UserProfile&gt; {
    @override
    Widget build(BuildContext context) {
      return SliverList(
        delegate: SliverChildListDelegate(
          [
            _mySetsLists(context),
            Divider(),
            StreamBuilder&lt;FirebaseUser&gt;(
              stream: FirebaseAuth.instance.onAuthStateChanged,
              builder: (context, snapshot) {
                if (snapshot.connectionState == ConnectionState.active) {
                  FirebaseUser user = snapshot.data;
                  if (user == null) {
                    return Text('not logged in');
                  }
                  return ListTile(
                    leading: CircleAvatar(
                      backgroundImage: NetworkImage(
                        user.photoUrl,
                      ),
                    ),
                    title: Text(user.displayName),
                    subtitle: Text(user.email),
                    trailing: new IconButton(
                        icon: new Icon(Icons.exit_to_app),
                        highlightColor: Colors.pink,
                        onPressed: () {
                          authService.signOut();
                        }),
                  );
                } else {
                  return Text("loading profile"); // &lt;---- THIS IS WHAT I SEE
                }
              },
            ),
          ],
        ),
      );
    }
  </code></pre>