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

  

 

    原文作者:CrossPython
    原文地址: https://www.cnblogs.com/pythonClub/p/10615564.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞