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(),
          );
        }),))]
    )
);

  

 

posted @ 2019-03-28 15:55  CrossPython  阅读(656)  评论(0编辑  收藏  举报