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,
Just use spread operator:
return new GridView.count( crossAxisCount: 2, padding: const EdgeInsets.all(10.0), crossAxisSpacing: 10.0, mainAxisSpacing: 10.0, children: [...getList()], );