I am trying to add data using for loop in gridview but it is showing some error. Here is my code for component
return new GridView.count( crossAxisCount: 2,
Here you are wrapping a list as list
children: [getList()],
This should rather be
children: getList(),