type "Liste<dynamique>" n'est pas un sous-type du type " Liste<Widget>'

J'ai un bout de code que j'ai copié à partir Firestore exemple:

Widget _buildBody(BuildContext context) {
    return new StreamBuilder(
      stream: _getEventStream(),
      builder: (context, snapshot) {
        if (!snapshot.hasData) return new Text('Loading...');
        return new ListView(
          children: snapshot.data.documents.map((document) {
            return new ListTile(
              title: new Text(document['name']),
              subtitle: new Text("Class"),
            );
          }).toList(),
        );
      },
    );
  }

Mais j'obtiens cette erreur

type 'List<dynamic>' is not a subtype of type 'List<Widget>'

Ce qui ne va pas ici?

OriginalL'auteur Arash | 2018-04-01