gt_sizer 1.2.0
gt_sizer: ^1.2.0 copied to clipboard
A responsive sizing utility for Flutter with hybrid scaling for width, height, fonts, icons, and spacing across mobile, tablet, and desktop devices.
1.2.0 #
Compatibility Upgrades 🛠️ #
- Flutter 3.44.2 Support: Fully compatible with Flutter 3.44.2 and Dart 3.12.2 SDK.
- Swift Package Manager (SPM): Verified compatibility with the new Flutter Swift Package Manager (SPM) dependency system for native iOS builds.
- Environment Update: Updated SDK and Flutter constraints in
pubspec.yamlandexample/pubspec.yaml.
1.1.0 #
Improvements 🚀 #
Flutter SDK Upgrade
- Upgraded project to leverage the latest stable Flutter & Dart SDKs.
- Optimized compatibility with modern Dart features.
Performance Optimization
- Refactored
MediaQueryaccess to use more efficient granular fetchers. - Replaced
MediaQuery.of(context)withMediaQuery.sizeOf(context),paddingOf(context), andviewInsetsOf(context)inResponsiveUtils. - This change ensures better performance by reducing unnecessary widget rebuilds.
Maintenance
- Internal code cleanup and adherence to Flutter best practices.
- Verified stable behavior across Mobile, Tablet, and Desktop.
1.0.0 #
Initial Release 🚀 #
Features
-
ResponsiveUtils - Core responsive engine with hybrid scaling
- Automatic initialization with
WidgetsBindingObserver - Screen metrics detection (width, height, safe areas)
- DPI-aware scaling with orientation tuning
- Foldable device support
- Automatic initialization with
-
SizeManager - Static utility class for responsive sizing
- Width sizes:
w1tow300(22 presets) - Height sizes:
h1toh300(22 presets) - Font sizes:
f8tof40(12 presets) - Icon sizes:
i12toi64(8 presets) - Spacing utilities:
all(),horizontal(),vertical(),symmetric(),only() - Space widgets:
horizontalSpace(),verticalSpace() - Safe area widgets:
safeAreaTopSpace,safeAreaBottomSpace, etc. - Screen values:
screenWidth,screenHeight,safeTop,safeBottom - Breakpoints:
isMobile,isTablet,isDesktop
- Width sizes:
-
SizeExtension - Num extensions for convenient scaling
.w- Width scaling.h- Height scaling.sp- Font/icon scaling
Device Support
- Mobile devices (< 600dp)
- Tablets (600dp - 1200dp)
- Desktop/Web (>= 1200dp)
- Foldable devices with aspect ratio tuning
- Landscape/Portrait orientation handling