I'm using StreamBuilder to get continuous data from firebase and I want it to be displayed in a table from. I have used DataTable with map function biut it's not working. please help. This is my Code.
rows: [
snapshot.data!
.map<DataCell>((e) => DataRow(cells: [
DataCell(Text(data['Name'].toString())),
DataCell(Text(data['Number'].toString())),
]))
],
And I'm getting this error:
" The method 'map' isn't defined for the type 'QuerySnapshot'. Try correcting the name to the name of an existing method, or defining a > method named 'map'."