title: Flutter error The argument type 'Map<String, dynamic> Function()' can't be assigned to the parameter type 'Map<String, dynamic>'
body: <p>I am trying to create some charts in a flutter, I am getting stuck in DocumentSnapshot.data I feel like flutter has changed the naming but I can not find it anywhere.</p>
  <pre><code>Widget _buildBody(BuildContext context) {
      return StreamBuilder&lt;QuerySnapshot&gt;(
        stream: FirebaseFirestore.instance.collection('sales').snapshots(),
        builder: (context, snapshot) {
          if (!snapshot.hasData) {
            return LinearProgressIndicator();
          } else {
    
            List&lt;Sales&gt; sales = snapshot.data.docs
                .map((documentSnapshot) =&gt; Sales.fromMap(DocumentSnapshot.data))
                .toList();
            return _buildChart(context, sales);
          }
        },
      );
    }
  </code></pre>