Overview
RectGetter is a Flutter package that simplifies the process of obtaining a child widget's rectangle dimensions and position after rendering. It provides a convenient way to access precise layout information such as offset, size, and bounds within a widget tree. Ideal for gesture detection, animations, or UI alignment tasks requiring accurate spatial data. The package works across all major platforms including Android, iOS, Web, macOS, Windows, and Linux, ensuring consistent behavior regardless of target environment.
Use cases
- Gesture-based interactions
- Dynamic UI positioning
- Animation triggers based on layout
- Debugging widget placement
- Overlay element alignment
Key features
- Real-time rectangle data after render
- Cross-platform compatibility
- Simple API integration
- Supports nested widgets
- Accurate offset and size reporting
Suitable for
- Developers needing layout metrics
- UI/UX designers implementing interactive layouts
- Apps with dynamic or responsive interfaces
- Debugging layout issues
- Custom gesture detectors
Considerations
- Requires post-render access to widget tree
- May impact performance if overused
- Not suitable for immediate pre-render measurements
- Limited to visible and rendered children
- Best used in conjunction with build context
