Vertical viewport was given unbounded height
可以通过指定shrinkWrap = true
为了你ListView
。
ListView(
shrinkWrap: true,
children...
这个办法我用了还是报错, 用下面的办法可以了,
put grid view inside Flexible or Expanded widget
return new Material( color: Colors.deepPurpleAccent, child: new Column( mainAxisAlignment: MainAxisAlignment.center, children:<Widget>[ Flexible( child: GridView.count(crossAxisCount: _column,children: new List.generate(_row*_column, (index) { return new Center( child: new CellWidget(), ); }),))] ) );