lazy_wrap
1.1.3, released 3 weeks ago by hensell.dev
A Flutter widget for lazy Wrap-style layouts with fixed or variable item sizes.
WASM-ready
What it does
lazy_wrap brings lazy rendering to wrap-like Flutter layouts. It allows displaying large collections of chips, tags, cards, and tiles without eagerly building every child by offering fixed and dynamic rendering modes.
AI-written summary of version 1.1.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You have large collections of chips, tags, or cards arranged in a wrap layout.
- You need lazy rendering for wrap-like layouts with either fixed or variable item dimensions.
Skip it when
- You are looking for standard grid or vertical lists where GridView.builder or ListView.builder suffice.
- You need complex multi-axis scroll behaviors outside of standard wrap orientations.
Strengths
- Supports both fixed and dynamic item sizes.
- Improves performance over eager building for large collections of wrap items.
- Offers offstage measurement and optional fade-in animations for dynamic items.
Weaknesses
- Dynamic mode requires offstage measurement passes or experimental sliver implementations.
- Changing layout revisions can reset the internal scroll position if using the internal controller.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
LazyWrap.fixed(
itemCount: 10000,
estimatedItemWidth: 120,
estimatedItemHeight: 96,
spacing: 8,
runSpacing: 8,
padding: const EdgeInsets.all(16),
itemBuilder: (context, index) {
return ProductCard(index: index);
},
)Alternatives
Packages that do the same job and could replace lazy_wrap.
- flutter_staggered_grid_view
Provides advanced staggered grid layouts if you need complex grid arrangements instead of a simple wrap.
50Compare