List<Widget> is not a subtype of type widget code example
Example 1: type '_Type' is not a subtype of type 'Widget'
wrong:
return Foo;
right:
return Foo();
Example 2: type 'List' is not a subtype of type 'List'
snapshot.data.documents.map<Widget>((document) {
return new ListTile(
title: new Text(document['name']),
subtitle: new Text("Class"),
);
}).toList()