I have a bunch of cards with varying heights, and I'd like to display them in a grid, where the row height is the height of the row's tallest widget, like so:
╔════╗╔════╗╔════╗╔════╗
║ ║║ ║║ ║║ ║
║ ║╚════╝║ ║║ ║
╚════╝ ║ ║╚════╝
╚════╝
╔════╗╔════╗╔════╗╔════╗
║ ║║ ║║ ║║ ║
║ ║║ ║╚════╝║ ║
╚════╝║ ║ ║ ║
║ ║ ╚════╝
╚════╝
╔════╗╔════╗╔════╗╔════╗
║ ║║ ║║ ║║ ║
║ ║╚════╝║ ║║ ║
╚════╝ ╚════╝║ ║
╚════╝
How can I do this? I'd prefer not to use third-party packages; flutter_staggered_grid_view
, for example, has a critical bug related to window resizing making it unusable for me.
you can try to use
ListView + Row
. Remember to set crossAxisAlignment to start and mainAxisSize to min