adaptive_foreground 0.0.4
adaptive_foreground: ^0.0.4 copied to clipboard
Flutter widget that auto-selects black or white foreground from background luminance. Includes status-bar sync and live RepaintBoundary pixel sampling.
Changelog #
All notable changes to this project will be documented in this file.
The format follows Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.4 - 2026-05-24 #
Fixed #
- Fixed broken relative
demo.gifpath inREADME.mdby utilizing absolute raw GitHub URLs so that project visualizer media renders flawlessly on pub.dev.
0.0.3 - 2026-05-24 #
Added #
AdaptiveNavBarwidget — a pixel-perfect, pure-Flutter replica of the Apple App Store's adaptive frosted glass bottom navigation bar.CNSymbolandCNTabBarintegrations fromcupertino_nativeinside the example application to show authentic platform tab bars on iOS.- Dynamic
AdaptiveThemeresolving surface blurs, inactive elements tints, dynamic active highlight pills, and micro-thin top borders. - Isolated, low-resolution pixel sampling in
BrightnessSamplerwith debouncing (> 100ms) and smooth transitions (250ms curve). - Dedicated widget and unit test coverage in
test/adaptive_nav_bar_test.dartasserting correct rendering, taps, and theme color maps.
Fixed #
- Relocated
AppAdaptiveForegroundcontext insideColorPlaygroundPageusing direct background color hint mapping, completely bypassing fragile screen captures and resolving Platform View compositing conflicts on iOS. - Restored explicit
tint: coloron iOS native buttons to ensure native visual glass effects adapt dynamically to contrast state. - Upgraded Android circular action buttons to implement high-performance
BackdropFilterglassmorphism blurs andAnimatedContainertransitions matching iOS tab bar aesthetics. - Custom-themed all example swiper pages and bottom tab items (Demo, Contrast, Glass, Metrics, Docs) to focus entirely on showcasing package features and guides.
0.0.2 - 2026-05-08 #
Fixed #
- Shortened
pubspec.yamldescription to satisfy the pub.dev 180-character limit. - Added dartdoc comments to all public API fields (
AppAdaptiveForeground,AppButtonIosAndroid,AppIosButton) to exceed the 20 % documentation threshold.
0.0.1 - 2026-05-08 #
Added #
AppAdaptiveForegroundwidget — adaptive black/white foreground color based on background luminance, with smooth 300 msColorTweentransitions.- Hysteresis (
hysteresisparameter, default0.08) prevents status-bar icon oscillation when sampled luminance hovers near the switching threshold. - Two sampling strategies:
backgroundColorHint(instant) and live backdrop sampling via aRepaintBoundarysamplingKey. updateStatusBarflag to keepSystemUiOverlayStylein sync automatically.- Static accessors:
AppAdaptiveForeground.of,backgroundColorOf,systemStyleOf. AppButtonIosAndroid— cross-platform circular action button (native iOSCNButtonon iOS, MaterialInkWellcircle on Android).AppIosButton— thin wrapper overcupertino_native'sCNButton.icon.AppDimensions— lightweight sizing constants (no external scaling library).- MIT License.