<!-- Thank you for using Flutter!
If you are looking for support, please check out our documentation
or consider asking a question on Stack Overflow:
* https://flutter.dev/
* https://api.flutter.dev/
* https://stackoverflow.com/questions/tagged/flutter?sort=frequent
If you have found a bug or if our documentation doesn't have an answer
to what you're looking for, then fill our the template below. Please read
our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->
<!-- Please tell us exactly how to reproduce the problem you are running into.
Please attach a small application (ideally just one main.dart file) that
reproduces the problem. You could use https://gist.github.com/ for this.
If the problem is with your application's rendering, then please attach
a screenshot and explain what the problem is.
-->
<!-- Please tell us which target platform(s) the problem occurs (Android / iOS / Web / macOS / Linux / Windows) Which target OS version, for Web, browser, is the test system running? Does the problem occur on emulator/simulator as well as on physical devices? -->
Target Platform: Target OS version/browser: Devices:
<!--
Run your application with flutter run --verbose
and attach all the
log output below between the lines with the backticks. If there is an
exception, please see if the error message includes enough information
to explain how to solve the issue.
-->
<!--
Run flutter analyze
and attach any output of that command below.
If there are any analysis errors, try resolving them before filing this issue.
-->
<!-- Finally, paste the output of running flutter doctor -v
here. -->
Please help me to solve this problem
Error: type 'List<Widget>' is not a subtype of type 'Widget'
generateStudentList(AsyncSnapshot<QuerySnapshot> snapshot) { return snapshot.data.documents .map<Widget>( (doc) => new ListTile( title: new Text(doc['name']), subtitle: Text( doc['age'].toString(), ), trailing: Container( width: 100, child: Row( children: <Widget>[ IconButton( onPressed: () { setState(() { _nameController.text = doc['name']; _ageController.text = doc['age'].toString(); docIdToUpdate = doc.documentID; isUpdate = true; }); }, icon: Icon( Icons.edit, color: Colors.blue, ), ), IconButton( onPressed: () { deleteStudent(doc); }, icon: Icon( Icons.delete, color: Colors.red, ), ), ], ), ), )) .toList(); }