title: Flutter - how can get the index value of snapshots?
body: <p>i want to get all document in flutter list view.. so i do this...</p>
  <pre><code>class AudioScreenList extends StatefulWidget {
    @override
    _AudioScreenListState createState() =&gt; _AudioScreenListState();
  }
  
  class _AudioScreenListState extends State&lt;AudioScreenList&gt; {
    bool isPerformingRequest = false;
  
    static const String _collectionRussian = 'users';
    static const String _loadingTextRussian = 'Loading...';
    static const String _speechTitle = 'full_name';
    static const String _speechSubtitle = 'coins';
    static const String _audioLink = 'audioLink';
    static const String _pastorCode = 'pastorCode';
    static const String _pastorName = 'coins';
    static const String _id = &quot;id&quot;;
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: StreamBuilder(
          stream: FirebaseFirestore.instance
              .collection(_collectionRussian)
              // .orderBy(_id, descending: true)
              .snapshots(),
          builder: (context, AsyncSnapshot&lt;QuerySnapshot&gt; snapshot) {
            if (!snapshot.hasData)
              return const Center(
                  child: Text(
                _loadingTextRussian,
                style: TextStyle(fontSize: 25.0, color: Colors.grey),
              ));
            return ListView(children: getExpenseItems(snapshot));
          },
        ),
      );
    }
  
    getExpenseItems(AsyncSnapshot&lt;QuerySnapshot&gt; snapshot) {
      // ignore: deprecated_member_use
      return snapshot.data.documents
          .map(
            (doc) =&gt; Container(
              margin: const EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 0.0),
              child: ListTile(
                  leading: Container(
                    width: 70.0,
                    height: 70.0,
                    child: Image.asset(
                      &quot;assets/profile.png&quot;,
                      fit: BoxFit.cover,
                    ),
                  ),
                  title: Text(doc[_speechTitle]),
                  subtitle: Text(
                    doc[_speechSubtitle].toString(),
                  ),
                  onTap: () =&gt; {}),
            ),
          )
          .toList();
    }
  }
  </code></pre>
  <p>how i get Document id in from StreamBuilder?
  when click on this button open another list &amp; detect the click document list
  <a href="https://i.stack.imgur.com/8EaFK.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>i tried this but not working....</p>
  <blockquote>
  <p>snapshot.data.doc['index']</p>
  </blockquote>
  <p>i want to get document id when click on the list item..</p>