uih 1.0.6
uih: ^1.0.6 copied to clipboard
A Flutter utility package providing responsive UI helpers, MediaQuery extensions, and platform-specific sizing utilities for consistent cross-platform layouts.
CHANGELOG #
1.0.6 - 2025-01-19 Release #
Critical Bug Fixes #
- CRITICAL: Fixed
roundToDecimalPlaces()bug indouble_ext.dart- was using multiplication instead ofpow()function, causing incorrect rounding results. - Added
dart:mathimport forpow()function andpiconstant. - Replaced all hard-coded pi values (3.141592653589793238) with
math.piconstant.
Code Quality Improvements
- Removed unnecessary
this.prefixes for cleaner, more idiomatic Dart code. - Standardized all extension naming to PascalCase with 'Uih' prefix:
uihDouble→UihDoubleExtensionuihInt→UihIntExtensionuihString→UihStringExtensionWidgetStateHelpers→UihWidgetStateExtensionIterableExtensions→UihIterableExtension
Comprehensive Test Coverage (176 total tests, all passing)
- New Unit Tests (130 tests, 100% coverage of extension methods):
test/double_ext_test.dart- 46 tests covering all 6 methodstest/int_ext_test.dart- 16 tests covering both methodstest/string_ext_test.dart- 30 tests covering all 5 methodstest/iterable_ext_test.dart- 38 tests covering all extensions
- Fixed Pre-existing Tests:
- Fixed all 20 failing tests in
test/uih_test.dart - Replaced improper Mockito mocking with proper Flutter widget testing
- Converted all unit tests to widget tests using
testWidgets() - Used real MediaQuery widgets instead of mocks for accurate testing
- Re-enabled and fixed
isLandscapetest - Removed mockito dependency
- Fixed all 20 failing tests in
Example App Redesign
- Complete Redesign:
- Removed old example folder
- Created fresh Flutter project with latest template (Flutter 3.10+)
- Refactored from 1 monolithic file (1,083 lines) to 21 modular files
- Professional file organization with pages/ and widgets/ directories
- Implemented barrel exports pattern for clean imports
- New Example Features:
- Responsive Sizing page with side-by-side comparisons
- Font Scaling page with .sp and .af visual demonstrations
- Device Detection page with Material Design 3 breakpoints
- Theme Integration page showcasing color schemes
- Extensions Showcase page with interactive examples
- UI/UX Excellence:
- Professional card-based comparison widgets
- Material Design 3 compliant with semantic color usage
- Clean visual hierarchy and generous spacing
- Perfect dark mode support
- WCAG AA accessibility compliance
- 100% theme integration (zero hardcoded colors)
Design & Visual Improvements
- Added professional font comparison widgets (
ScaledFontComparison,AdaptiveFontComparison) - Implemented comprehensive color scheme audit - replaced all hardcoded colors with theme colors
- Added proper
crossAxisAlignment: CrossAxisAlignment.startto all Column widgets - Modern API usage: all
withOpacity()replaced withwithValues(alpha:)
Documentation
- Added comprehensive documentation comments to all public classes
- Updated README with new features and examples
- Added context-free API documentation with
UihInitwrapper - Added
num_ext.dartwith dual API support (context-free and context-based) - Added
uih_config.dartwith Uih static class for global state management
Quality Assurance
- Flutter analyze: 0 issues found
- All 176 tests passing (100% pass rate)
- Zero deprecated API usage
- Production-ready code quality
- Version bumped to
1.0.6
1.0.5 - 2023-06-11 Release #
- Task: added
textThemeInstance. - Task: added
colorSchemeInstance. - Task: added
defaultTextStyleInstance. - Task: added
navigatorInstance. - Task: added
focusScopeInstance. - Task: added
scaffoldInstance. - Task: added
context_extas separate file and exported it. - Task: added
int_extas separate file and exported it to introducetimes, andtimesReverse. - Task: added
string_extas separate file and exported it to introduceisEmail,containsIgnoreCase,toCamelCase,capitalize, andreverse. - Task: added
double_extas separate file and exported it to introduceroundToDecimalPlaces,toPercentage,isInteger,toRadians,toDegrees, andformatDecimalPlaces. - Task: added
iterable_extas separate file and exported it to introduceIterableExtensions, andWidgetStateHelpers. - Task:
UiHLogo introduced. - Task:
README.mdupdated. - Task: version bumped to
1.0.5.
1.0.4 - 2023-05-31 Release #
- Task: added
RelativeFontSizefunctionality. - Task: added
RelativeFontSizeWithBreakPointfunctionality. - Task: updated example.
- Task: added initial unit_test for future reference.
- Task: version bumped to
1.0.4.
1.0.3 - 2022-10-26 Release #
- Task: Scaffold Messenger section Supporting
showSnackBar. - Task: added example.
- Task: version bumped to
1.0.3.
1.0.2 - 2022-10-26 Release #
- Task: Theme section added with current variables as following :
theme,backgroundColor,typography,brightness. - Task: added example.
- Task: .pubignore introduced.
- Task: version bumped to
1.0.2.
1.0.1 - 2022-10-25 Release #
- Task: added bool identifiers such as
isMobile,isTablet, andisDesktop. - Task: added example.
- Task: version bumped to
1.0.1.
1.0.0 - 2022-10-21 Release #
- Task: removed old code implementation.
- Task: added extension-based implementation.
- Task: added example.
- Task: version bumped to
1.0.0.
0.1.2 - 2021-05-23 Release #
- Task: Added Vertical and Horizontal Spacer widget support.
- Task: Meta Data updated.
0.1.1 - 2021-03-14 Release #
- Task: README updated.
- Task: Meta Data updated.
0.1.0 - 2021-03-14 Release #
- Task: Initial release.
- Task: License added.
- Task: Change log Updated.