flutter_screenutil_plus 1.3.0
flutter_screenutil_plus: ^1.3.0 copied to clipboard
A powerful Flutter plugin for adaptive screen and font scaling with CSS-like breakpoints and SwiftUI-style size classes. Includes responsive scaling and breakpoint-aware widgets.
Changelog #
All notable changes to this project will be documented in this file.
1.3.0 - 2025-12-07 #
Added #
- Default Initialization:
ScreenUtilPlusfields now initialize with default values (defaultSizeof 360x690) instead of empty/zero values, preventing issues when accessed before explicit configuration. - Optional Configuration:
designSizeparameter ininit,configure, andScreenUtilPlusInitis now optional, defaulting to 360x690. This allows for simpler setup when using standard defaults.
1.2.2 - 2025-12-07 #
Changed #
- Revert:
designSizeparameter inScreenUtilPlus.initandScreenUtilPlusInitis now required again. The previous change to make it optional was reverted to ensure explicit configuration.
Fixed #
- Crash Fix: Fixed
LateInitializationErrorinScreenUtilPlus.configurewhen called with null parameters before initialization. Added default values for internal flags to prevent this crash.
1.2.1 - 2025-12-03 #
Added #
- Comprehensive Test Suite: Added extensive test coverage for all new features
- Unit tests for
AdaptiveValuesclass (100% coverage) - Unit tests for
AdaptiveContainerandSimpleAdaptiveContainerwidgets (94.7% coverage) - Unit tests for
Breakpointsclass (95% coverage) - Unit tests for
ResponsiveQueryclass (100% coverage) - Additional tests for
SizeClassBuilderandConditionalBuilderwidgets - Achieved 98.3% overall code coverage with 500+ tests
- Unit tests for
Changed #
- Documentation: Comprehensive pub.dev documentation update
- Complete README.md rewrite with all features documented
- Added CSS-like breakpoints documentation section
- Added SwiftUI-like size classes documentation section
- Added adaptive widgets documentation with examples
- Added API reference tables
- Added best practices guide
- Enhanced package description in
pubspec.yaml
Fixed #
- Fixed test failures in
AdaptiveContainertests by properly handling.wand.hscaling - Fixed
SizeClassBuildertest to use appropriate screen sizes for compact/regular detection - Fixed padding fallback behavior in
AdaptiveValuestests to match actual implementation
1.2.0 - 2025-12-02 #
Added #
-
CSS-like Breakpoints System: Added comprehensive breakpoint system with predefined sets (Bootstrap, Tailwind, Material Design, Mobile-first)
Breakpointsclass with configurable breakpoint valuesBreakpointenum (xs, sm, md, lg, xl, xxl)- Context extensions for easy breakpoint checking (
context.breakpoint,context.isAtLeast(), etc.) - Breakpoint comparison methods (
isAtLeast(),isLessThan(),isBetween(),isExactly())
-
SwiftUI-like Size Classes: Added size class system for adaptive layouts
SizeClassenum (compact, regular) for horizontal and vertical dimensionsSizeClassesclass with helper methods- Context extensions (
context.sizeClasses,context.horizontalSizeClass, etc.) - Customizable threshold for size class determination
-
Responsive Query Utilities: Added utilities for responsive design queries
ResponsiveQueryclass for breakpoint-based value selectionAdaptiveValuesclass for responsive sizing with breakpoints (width, height, fontSize, radius, padding, margin)- Context extensions for convenient access
- Value selection with automatic fallback to larger/smaller breakpoints
-
Adaptive Text Styles: Added extensions for creating adaptive text styles
AdaptiveTextStyleExtensiononBuildContextfor breakpoint-based text stylesTextStyleExtensiononTextStylewith responsive methods (.r,withLineHeight(),withAutoLineHeight(),withLineHeightFromFigma())
-
Adaptive Widgets: Added new responsive widgets
AdaptiveContainerandSimpleAdaptiveContainer- Containers that adapt properties based on breakpointsAdaptiveText- Text widget that adapts style properties based on breakpointsResponsiveBuilder- Builder widget for different breakpoints with fallback chainSizeClassBuilder- Builder widget for size classes (compact/regular, horizontal/vertical)ConditionalBuilder- Conditional rendering based on breakpoint conditions
-
Comprehensive Test Coverage: Added extensive test suite
- Integration tests for all adaptive features
- Unit tests for breakpoints, size classes, responsive queries, and adaptive values
- Widget tests for all adaptive widgets
- 98.3% code coverage with 500+ tests
-
Documentation: Comprehensive pub.dev documentation
- Complete README with all features documented
- API reference tables
- Usage examples for all features
- Best practices guide
Changed #
- Updated
ResponsiveThemeto use newTextStyleExtension.rfor responsive text styles - Enhanced
RTextwidget with improved responsive text handling - Improved package description in
pubspec.yamlto highlight new features - Enhanced library documentation comments for better API documentation on pub.dev
Fixed #
- Fixed test failures in adaptive container tests by properly handling scaling
- Fixed size class builder test to use appropriate screen sizes
- Fixed padding fallback behavior in adaptive values tests
1.1.1 2025 #
Added #
- Implemented change detection for screen metrics using Equatable to optimize rebuilds
- Added
_ScreenMetricsclass with value-based equality comparison for efficient configuration change detection
Changed #
- Optimized rebuild behavior: registered elements now only rebuild when screen metrics or fontSizeResolver actually change
- Improved performance by preventing unnecessary rebuilds when configuration remains functionally identical
1.1.0 2025 #
Added #
- New
ScreenUtilModebehavior refactor with responsive rebuilding improvements - Additional unit tests covering new utilities, rebuild flow, and registerToBuild edge cases
Changed #
- Refactored
ScreenUtilPlusInitto reduce duplication and improve responsiveness - Extracted
DeviceTypeenum andMediaQueryDataextension into dedicated utility files - Improved
ScreenUtilPlus.configureerror handling and rebuilt element management
1.0.2 2025 #
Added #
- Comprehensive example app demonstrating all package features
- Library-level documentation with usage examples
- Documentation for
BorderRadiusExtensionand its methods (.r,.w,.h) - Documentation for
BoxConstraintsExtensionand its methods (.r,.hw,.w,.h) - Example directory with complete working demo
Changed #
- Improved pub.dev score with complete API documentation
1.0.1 2025 #
Changed #
- Reorganized package structure for better maintainability
- Improved folder organization with logical subdirectories (core, widgets, extensions, mixins, utils, internal)
1.0.0 2025 #
Added #
- Comprehensive unit test coverage (114+ tests)
- Fixed deprecation warning: replaced
textScaleFactorwithtextScaler.scale(1.0) - Improved error handling for defunct elements in
configuremethod
Fixed #
- Fixed assertion error when trying to rebuild defunct elements
- Fixed
spextension test by properly handling fontSizeResolver