auto_height_grid_view
1.0.0, released 4 years ago by by3kdeveloper.blogspot.com
A customizable grid view widget with items that automatically adjust height based on content.
WASM-ready
What it does
Provides a grid view widget for Flutter that automatically computes the height of each grid item according to its content, removing the need for strict aspect ratios. It supports properties like crossAxisCount, spacing, physics, padding, and shrinkWrap.
AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a grid layout where items have varying content heights.
- You want to avoid fixed aspect ratios for grid cells.
Skip it when
- You need complex staggered grid layouts supported by other dedicated packages.
- You require advanced layout builders not covered by basic grid properties.
Strengths
- Automatically adjusts item heights based on content
- Easy to use with standard grid properties like crossAxisCount and spacing
Weaknesses
- Limited properties compared to more advanced grid libraries
- Initial release with basic functionality
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
not documented
AutoHeightGridView(
itemCount: 10,
crossAxisCount: 2,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(12),
shrinkWrap: true,
builder: (context, index) {
return Container(
width: double.infinity,
height: 150,
color: Colors.red,
);
},
)Alternatives
Packages that do the same job and could replace auto_height_grid_view.
- flutter_staggered_grid_view
Choose this if you need advanced staggered grid layouts with varying item sizes and patterns.
50Compare