zeba_academy_measure 0.0.1
zeba_academy_measure: ^0.0.1 copied to clipboard
Lightweight Flutter utility to measure widget size, position, and listen to layout changes using GlobalKey helpers.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog (https://keepachangelog.com/en/1.0.0/) and this project follows Semantic Versioning.
0.0.1 - 2026-07-06 #
๐ Initial Release #
This is the first release of zeba_academy_measure.
โจ Added #
- ๐ Measure widget size using
GlobalKey - ๐ Get widget global position on screen
- ๐ GlobalKey extension helpers:
key.sizeโ returns widget sizekey.positionโ returns global offset positionkey.metricsโ returns combinedWidgetMetrics
- ๐งฉ
MeasureControllerfor manual measurement trigger with callback support - ๐ฆ
MeasureWidgetfor automatic size and position tracking - ๐
SizeChangeListenerfor detecting layout size changes in real time - โก Post-frame safe measurement using
WidgetsBinding.instance.addPostFrameCallback
๐ง Technical Details #
- Uses
RenderBoxfor accurate layout measurement - Uses
LayoutBuilderfor constraint-based size detection - Uses
GlobalKeyextensions for simplified API - Safe post-frame execution to avoid build-time errors
โ ๏ธ Notes #
- Measurements are only available after the first frame is rendered
- Best used with constrained widgets (e.g.,
SizedBox,Containerwith fixed size) - Avoid using inside unbounded layouts for accurate results
๐งช Testing #
- Added widget test support for
WidgetMetrics - Added basic integration test for
GlobalKeymeasurement accuracy
[Unreleased] #
๐ง Planned #
- ๐ฅ Stream-based live measurement updates
- ๐ฅ Visibility detection (in-view tracking)
- ๐ฅ Scroll-aware measurement system
- ๐ฅ Riverpod integration support
- ๐ฅ Animation triggers on size change
- ๐ฅ Performance optimizations for frequent layout changes
๐ Versioning Strategy #
- Patch versions (0.0.x): Bug fixes and minor improvements
- Minor versions (0.x.0): New features, backward compatible
- Major versions (x.0.0): Breaking changes
๐จโ๐ป Maintainer #
Sufyan bin Uzayr
Open-source developer building developer tools and learning platforms.
๐ https://zeba.academy
๐ https://code.zeba.academy
๐ผ https://www.linkedin.com/in/sufyanism
๐บ https://www.youtube.com/@zeba.academy
๐ License #
Licensed under GNU General Public License v3.0 (GPL-3.0)