Overview
The measured_size package is a Flutter widget that dynamically calculates and exposes the size of its child widget at runtime. It wraps a child widget and provides its actual rendered dimensions, making it useful for layout adjustments based on real-time measurements. This is particularly helpful when building responsive or adaptive UIs where precise sizing is required. The package works across all major platforms including Android, iOS, Web, macOS, Windows, and Linux.
Use cases
- Responsive layouts
- Dynamic UI sizing
- Layout debugging
- Adaptive design
- Runtime dimension tracking
Key features
- Real-time size measurement
- Cross-platform support
- Simple API
- Child widget wrapping
- Size callback
Suitable for
- Developers needing dynamic layout logic
- UI builders requiring precise dimensions
- Debugging layout issues
- Custom widget creation
Considerations
- May impact performance if overused
- Requires careful placement in widget tree
- Not suitable for static layouts
- Limited to measuring direct child size
- Potential for layout rebuilds