flutter child.hasSize 错误

当在listview中嵌套Griview组件的时候,千万别忘记给Griview外层的Container添加高度哦

···
body: ListView(
children: [
// 导航条
Container(
height: 180, //new line
padding: EdgeInsets.only(top:10 ),
child: GridView.count(
crossAxisCount: 4,
mainAxisSpacing: 10,

···

发布了13 篇原创文章 · 获赞 2 · 访问量 714

猜你喜欢

转载自blog.csdn.net/weixin_39553363/article/details/104569138