title: How to get a document snapshot index
body: <p>I'm new to flutter and I'm trying to pass a firestore document snapshot to another class.
  I passed to the Profile class a snapshot document, and I want to indicate the index of my document, but I don't know how to get it
  I have this </p>
  
  <pre><code>                Expanded(
                  child: StreamBuilder&lt;QuerySnapshot&gt;(
                      stream: ((searchString != null) &amp;&amp;
                              (searchString.trim() != ""))
                          ? Firestore.instance
                              .collection('pazienti')
                              .where("searchIndex",
                                  arrayContains: searchString)
                              .snapshots()
                          : Firestore.instance
                              .collection('pazienti')
                              .snapshots(),
                      builder: (BuildContext context,
                          AsyncSnapshot&lt;QuerySnapshot&gt; snapshot) {
                        if (snapshot.hasError)
                          return Text('Error: ${snapshot.error}');
                        switch (snapshot.connectionState) {
                          case ConnectionState.waiting:
                            return Center(child: CircularProgressIndicator());
                          default:
                            return ListView(
                              children: snapshot.data.documents
                                  .map((DocumentSnapshot document) {
  
                                return Card(
  
                                  elevation: 10.00,
                                  margin: EdgeInsets.all(0.50),
                                  child: ListTile(
                                    onTap: () {
                                      Navigator.push(context, MaterialPageRoute(builder: (context) =&gt; Profile(miaquery: snapshot.data.documents[????])));
                                    } 
                                    ,
                                    leading: CircleAvatar(
                                      backgroundColor:
                                          Colors.blueGrey.shade800,
                                    ),
                                    title: Text(document['cognome'] +
                                        " " +
                                        document['nome']),
                                    subtitle: Text(document['cognome'] +
                                        " " +
                                        document['nome']),
                                     ),
                                );
  
                              }).toList(),
                            );
                        }
                      })),
            ],
          ),
        )
  </code></pre>
  
  <p>My problem is essentially here</p>
  
  <pre><code>Navigator.push(context, MaterialPageRoute(builder: (context) =&gt; Profile(miaquery: snapshot.data.documents[XXXX]))
  </code></pre>
  
  <p>How can I get the index of the document from the map I used?</p>
  
  <p>Thank you very much for your help</p>