【flutter】flutter listview嵌套gridview高度报错问题怎么解决?

flutter listview嵌套gridview高度报错问题怎么解决?

body: new ListView(

children: <Widget>[

new HomeSearch(),

new HomeSwiper(images: images),

new Product(),

new GridView.count(

physics: new NeverScrollableScrollPhysics(),

crossAxisCount: 3,

children: <Widget>[

new Text('123'),

new Text('123'),

new Text('123'),

],

)

],

),

【flutter】flutter listview嵌套gridview高度报错问题怎么解决?

回答

在GridView中添加shrinkWrap属性,设置为true

以上是 【flutter】flutter listview嵌套gridview高度报错问题怎么解决? 的全部内容, 来源链接: utcz.com/a/85920.html

回到顶部