Adjust GridView child height according to the dynamic content in flutter

前端 未结 5 2224
执念已碎
执念已碎 2020-12-23 17:14

How to implement this complex view in the flutter?

I am trying to implement a GridView with n columns and the child should be of a certa

5条回答
  •  清歌不尽
    2020-12-23 17:54

    crossAxisCount: 
    

    This defines how many columns present and,

    StaggeredTile.fit(value)
    

    represent how may children to fit in a single column vertically

    Example:

    crossAxisCount: 2,
    staggeredTileBuilder: (int index) => new StaggeredTile.fit(1),
    

    will give you the desired output above

提交回复
热议问题