title: The operator '[]' isn't defined for the type 'Map<String, dynamic> Function()'
body: <p>I'm new to flutter and working on a chat app YouTube tutorial. now getting below error in my code. how to resolve this. appreciate your help on this.</p>
  <p><a href="https://i.stack.imgur.com/ITAJj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ITAJj.png" alt="enter image description here" /></a></p>
  <pre><code>class Search extends StatefulWidget {
    const Search({Key? key}) : super(key: key);
  
    @override
    _SearchState createState() =&gt; _SearchState();
  }
  
  class _SearchState extends State&lt;Search&gt; {
  
  
    DatabaseMethods databaseMethods = new DatabaseMethods();
    TextEditingController searchEditingController = new TextEditingController();
  // QuerySnapshot searchSnapshot;
    QuerySnapshot &lt;Map&lt;String, dynamic&gt;&gt;? searchSnapshot;
   bool isLoading = false;
     bool haveUserSearched = false;
  
    Widget searchList(){
  
    return searchSnapshot != null? ListView.builder(
        itemCount: searchSnapshot!.docs.length,
        shrinkWrap: true,
    itemBuilder: (context,index){
          return SearchTile (
          name: searchSnapshot!.docs[index].data[&quot;name&quot;],
          email: searchSnapshot!.docs[index].data[&quot;email&quot;],
          );
    }) : Container();
  
  }
  </code></pre>