liquid_glass_widgets 0.2.1-dev.7 copy "liquid_glass_widgets: ^0.2.1-dev.7" to clipboard
liquid_glass_widgets: ^0.2.1-dev.7 copied to clipboard

A Flutter UI kit implementing the iOS 26 Liquid Glass design language. Features shader-based glassmorphism, physics-driven jelly animations, and dynamic lighting.

0.2.1-dev.7 #

  • FEAT: Added GlassDefaults constants class

    • Centralized default values for glass effects, dimensions, and animations
    • Includes: thickness, blur, lightIntensity, borderRadius, padding presets, etc.
    • Improves consistency and maintainability across all widgets
    • Accessible via import 'package:liquid_glass_widgets/liquid_glass_widgets.dart'
  • IMPROVE: Enhanced developer experience with debug assertions

    • LiquidGlassScope: Warns when nesting scopes (usually unintentional)
    • LiquidGlassBackground: Informs when used without a scope
    • GlassEffect: Validates background capture conditions
    • All assertions only run in debug mode (zero production overhead)
  • TEST:

    • 10 new tests for LiquidGlassScope.stack convenience constructor
  • FIX: Fixed LiquidGlassScope.stack double-Positioned widget error

    • Removed unnecessary Positioned.fill wrapper from content
    • Fixes "Competing ParentDataWidgets" error when using Scaffold as content
    • Content now naturally fills available space (simpler, more flexible)

0.2.1-dev.6 #

  • FEAT: Added LiquidGlassScope.stack convenience constructor (Skia/Web Premium)
    • Eliminates boilerplate for the common pattern of a background behind content
    • Example: LiquidGlassScope.stack(background: Image.asset(...), content: Scaffold(...))
    • Zero breaking changes - purely additive API improvement

0.2.1-dev.5 #

  • REFACTOR: Major architectural refactoring of interactive widgets for consistency and quality

    • Unified Interactive Indicator Architecture: Extracted shared AnimatedGlassIndicator component

      • Eliminates 877 lines of duplicated code across GlassBottomBar, GlassTabBar, and GlassSegmentedControl
      • Provides consistent jelly physics, glass effects, and animation behavior
      • Single source of truth for indicator rendering logic
      • Easier to maintain and extend with new features
    • **GlassSlider

      • Fixed dynamic sizing to match GlassSwitch pattern (glass shell now grows with scale animation)
      • Implemented proper vertical centering during balloon animation
      • Aligned architecture with GlassSwitch using static const settings
    • GlassSwitch Code Simplification: Reduced complexity while maintaining quality

      • Simplified thumb rendering logic by 40% (309 lines → cleaner structure)
      • Removed redundant conditional logic
      • Improved code readability and maintainability
      • Improved visual for more ios26 aesthetics
    • Architectural Consistency: All interactive widgets now follow the same pattern

      • Static const LiquidGlassSettings (no per-frame allocations)
      • Dynamic sizing for proper premium rendering
      • Stable content structure (no Transform.scale wrapping GlassEffect)
      • interactionIntensity parameter drives all animations
      • Opacity-based glow control (no conditional mounting)
  • PERF: Significant performance improvements across interactive widgets

    • 877 lines of code removed through shared component extraction
    • Static const settings eliminate per-frame allocations in GlassSlider
    • Optimized GlassEffect shader uniform updates
    • Better RepaintBoundary placement for render isolation
  • FEAT: Enhanced GlassEffect widget for better interactive indicator support

    • Improved background capture system with "Interaction Heartbeat"
    • Better coordinate synchronization for animated widgets
    • Optimized shader parameter passing
    • Support for dynamic shape sizing

0.2.1-dev.4 #

  • PERF: Optimized InteractiveIndicatorGlass (Skia/Web path) with a new "Interaction Heartbeat" system. This reduces overhead by 80% when using LiquidGlassScope by throttling background captures while maintaining smooth 10fps live refraction during active dragging.
  • FEAT: Universal Aesthetic Fallback: Interactive indicators now maintain their premium custom-shader lighting and rim structure even without a LiquidGlassBackground. Added a new "Synthetic Frost" mode that renders a high-fidelity glass material when no background is captured.
  • PERF: GPU optimization across all custom shaders; light direction vectors are now pre-calculated on the CPU, reducing per-pixel complexity for all glass widgets on Skia/Web.

0.2.1-dev.3 #

  • FIX: GlassBottomBarExtraButton now respects parent styling
    • Extra button icon color now inherits from GlassBottomBar.unselectedIconColor when not explicitly set
    • Extra button shape now matches parent's barBorderRadius (defaults to circular for standard 32px radius)
    • Added iconColor parameter to GlassBottomBarExtraButton for explicit color control
    • Thanks to @kermit83 for the contribution (#1)

0.2.1-dev.2 #

  • FEAT: Custom Shader Refraction for Interactive Indicators

    • New LiquidGlassScope + LiquidGlassBackground widgets for background capture
    • Custom fragment shader (interactive_indicator.frag) provides iOS 26 liquid glass refraction on all platforms
    • Works on Web, Skia, and macOS where Impeller's scene graph isn't available
    • Dynamic edge distortion with quadratic falloff for realistic lens effect
    • Chromatic aberration at edges for authentic prism refraction
    • Directional rim lighting and fresnel glow matching Impeller aesthetics
    • Fully documented shader with TWEAK: markers for easy customization
  • PERF: Parallel shader pre-warming in LiquidGlassWidgets.initialize()

    • Both LightweightLiquidGlass and InteractiveIndicatorGlass shaders now pre-warm in parallel
    • Eliminates cold start delay when first using segmented controls
  • TEST: Added comprehensive tests for new widgets

    • 14 new tests covering LiquidGlassScope and LiquidGlassBackground
    • Tests InheritedWidget behavior, nested scopes, key stability, and integration
  • EXAMPLE: Updated Shader Comparison demo

    • Side-by-side comparison of Impeller vs Custom Shader rendering
    • Simplified interactive page layout for mobile-friendly scrolling

0.2.1-dev.1 #

  • PERF: Batch-Blur Optimization - 5-6x faster rendering with multiple glass widgets

    • Containers now share a single BackdropFilter with all children (was: each widget had its own)
    • Card with 5 buttons: ~60ms → ~12ms (5x faster)
    • Scrolling lists: 25fps → 60fps (2.4x improvement)
    • Synthetic density physics in shader compensates for visual differences (imperceptible)
    • Automatic detection via InheritedLiquidGlass.isBlurProvidedByAncestor
  • FEAT: User-customizable saturation for all widgets

    • saturation parameter now works for buttons and all interactive widgets
    • Users can control color vibrancy: saturation: 0.7 (subtle) to 1.5 (vivid)
    • Matches Impeller's HSL-style saturation behavior across all platforms
  • REFACTOR: Separated concerns architecture (matches Impeller)

    • Introduced uGlowIntensity (18) and uDensityFactor (19) shader uniforms
    • Restored saturation to original purpose: color adjustment (no longer overloaded)
    • Interactive glow now uses explicit glowIntensity parameter (0.0-1.0)
    • Elevation physics now uses explicit densityFactor parameter (0.0-1.0)
    • Added glowIntensity parameter to AdaptiveGlass and LightweightLiquidGlass
  • PERF: GPU optimization - 8-12% faster shader execution

    • Branchless glow implementation eliminates warp divergence on mobile GPUs
    • Used step() function instead of conditional branches for parallel execution
  • FIX: Button press feedback bugs

    • Fixed no-op alpha boost (was interactionDelta * 0, now glowIntensity * 0.3)
    • Restored correct glow power (was 0.2, now 0.3 for visible feedback)
    • Button press now correctly increases opacity and brightness

0.2.0-dev.2 #

  • REFACTOR: Standardized light angle to 120° for interactive widgets
    • Updated default lightAngle from 90° to 120° for improved visual depth
    • Applied consistently across GlassInteractiveIndicator, GlassSegmentedControl, and GlassSwitch
    • Better matches Apple's design aesthetics with enhanced depth perception

0.2.0-dev.1 #

  • FEAT: Universal Platform Support with Lightweight Glass Shader

    • Lightweight Fragment Shader: High-performance shader-based rendering now works on all platforms (Web/CanvasKit, Skia, Impeller)
      • Faster than BackdropFilter while delivering iOS 26-accurate glass aesthetics
      • Matrix-synced coordinate system eliminates drift during parent transformations
      • Dual-specular highlights, rim lighting, and physics-based thickness response
      • Per-widget shader instances on Web (CanvasKit requirement), shared instance on native
    • AdaptiveGlass: Intelligent rendering path selection based on platform capabilities
      • Premium + Impeller → Full shader pipeline with texture capture and chromatic aberration
      • Premium + Skia/Web → Lightweight shader (automatic fallback)
      • Standard → Always lightweight shader (recommended default)
    • AdaptiveLiquidGlassLayer: Drop-in replacement for LiquidGlassLayer ensuring proper rendering on all platforms
      • Provides scope for grouped widgets while maintaining visual fidelity
    • Interactive Glow Support: Shader-based glow effects for button press states on Skia/Web
      • Matches Impeller's GlassGlow behavior using shader saturation parameter
      • Enables full interactive feedback across all platforms
  • REFACTOR: Completed lightweight shader migration across all widgets

    • Migrated GlassSideBar, GlassToolbar, and GlassSwitch to use AdaptiveGlass
    • Standardized on AdaptiveLiquidGlassLayer throughout example app and documentation
    • All 26 widgets now deliver consistent glass quality on Web, Skia, and Impeller
  • DOCS: Comprehensive documentation updates

    • Added Platform Support section to README (iOS, Android, macOS, Web, Windows, Linux)
    • Updated Quick Start with shader precaching guide (LightweightLiquidGlass.preWarm())
    • Corrected quality mode descriptions across 5 widgets and README
    • Clarified that GlassQuality.standard uses lightweight shader, not BackdropFilter
    • Added platform-specific rendering behavior notes for premium quality
  • PERF: Optimized web rendering pipeline

    • Per-widget shader lifecycle management on Web (CanvasKit requirement)
    • Eliminated coordinate drift with zero-latency physical coordinate mapping
  • FIX: Resolved platform-specific rendering issues

    • Fixed glass widgets appearing as solid semi-transparent boxes on Web when using premium quality
    • Fixed coordinate synchronization during parent transformations (LiquidStretch, scroll, etc.)
    • Ensured draggable indicators and navigation bars maintain glass appearance on Web and Skia

0.1.5-dev.11 #

  • PERF: Performance optimizations for GlassBottomBar and indicator animations
    • Eliminated expensive context.findAncestorWidgetOfExactType() call that was executed on every animation frame
    • Cached LiquidRoundedSuperellipse shape to avoid recreation during indicator animations
    • Cached default LiquidGlassSettings as static const to reduce allocations on every build
  • FIX: Fixed indicator flash when setting indicatorSettings explicitly
    • Fixed GlassInteractiveIndicator to always apply visibility animation regardless of custom settings
    • Ensures smooth fade transitions when custom indicator settings are provided

0.1.5-dev.10 (Retracted) #

0.1.5-dev.9 #

  • FIX: Fixed GlassBottomBar indicator layering issue
    • Interactive indicator now renders above the glass bar background
    • Resolves z-index issue affecting both GlassQuality.standard and GlassQuality.premium
  • REFACTOR: Improved indicatorSettings consistency across interactive widgets
    • Standardized indicator glass settings API in GlassBottomBar, GlassTabBar, and GlassSegmentedControl

0.1.5-dev.8 #

  • PERF: Major performance optimization across all widgets
    • Eliminated 21 color allocations with cached static const values
    • Added strategic RepaintBoundary placements to prevent cascading repaints
    • Optimized 14 widgets: GlassSearchBar, GlassFormField, GlassPicker, GlassIconButton, GlassChip, GlassSwitch, GlassSlider, GlassBottomBar, GlassTabBar, GlassSegmentedControl, GlassInteractiveIndicator, GlassDialog, GlassSheet, GlassSideBar
    • Result: 5-20% FPS improvement across navigation, input, and interactive widgets

0.1.5-dev.7 #

  • FEAT: Added Liquid Glass Menu System
    • GlassMenu: iOS 26 liquid glass morphing context menu
      • True morphing animation: button seamlessly transforms into menu
      • Critically damped spring physics (Stiffness: 180, Damping: 27) - zero bounce
      • Liquid swoop effect: 8px downward curve with easeOutCubic timing
      • Triple-layer clipping with width constraints for zero visual artifacts
      • Position-aware: expands from button location with automatic alignment
      • Scrollable content support with iOS-style ClampingScrollPhysics
    • GlassMenuItem: Configurable menu action items
      • Support for icons, destructive styling, and trailing widgets
      • Customizable height (defaults to 44px iOS standard)
    • GlassPullDownButton: Convenient wrapper for menu triggers
      • Integrates GlassMenu with specialized button styling
      • Auto-closing menu behavior and onSelected callback
    • GlassButtonGroup: Cohesive container for grouping related actions
      • "Joined" style layout for toolbar commands (e.g., Bold/Italic/Underline)
      • Automatically manages dividers between items
    • GlassButton: Added style property with GlassButtonStyle.transparent
      • Allows buttons to blend into groups without double-glass rendering artifacts

0.1.5-dev.6 #

  • PERF: Comprehensive Allocation Optimization
    • Implemented static const defaults for Shapes, Settings, and Styles across 9 core widgets (GlassButton, GlassIconButton, GlassChip, GlassTextField, GlassPasswordField, GlassCard, GlassAppBar, GlassToolbar, GlassDialog).
    • Significantly reduced object allocation pressure during rebuilds and animations.
    • GlassPicker: Switched to CupertinoPicker.builder for efficient O(1) lazy loading of large item lists.
    • GlassInteractiveIndicator: Optimized physics settings allocation to reduce per-frame GC overhead.

0.1.5-dev.5 #

  • CHORE: Code cleanup and documentation improvements
    • Improved header documentation for GlassFormField
    • General code polish and comment updates across input widgets
    • Fixed layout regressions in surfaces/overlays

0.1.5-dev.4 #

  • FEAT: Added Liquid Glass Input Suite

    • GlassFormField: Wrapper for labels, error text, and helper content
    • GlassPasswordField: Secure input with built-in visibility toggle and lock icon
    • GlassTextArea: Optimized multi-line input with smart padding and scrolling
    • GlassPicker: iOS-style selector with glass container and modal integration
    • GlassPicker: Supports "own layer" mode for premium transparency effects
  • FEAT: Added GlassSideBar widget

    • Vertical navigation surface with glass effect
    • Supports header, footer, and scrollable item list
    • Auto-layout for standard sidebar items with icons and labels
  • FEAT: Enhanced Configurability

    • Refactored all input widgets to expose standard TextField properties (focus, actions, styles)
    • Updated GlassTabBar to support custom borderRadius and indicatorBorderRadius
    • Exposed granular indicatorSettings in GlassTabBar for fine-tuned glass effects
  • FEAT: Added GlassToolbar widget

    • Standard iOS-style action toolbar
    • Supports transparent background and safe area integration
  • REFACTOR: Shared Indicator Logic

    • Extracted GlassInteractiveIndicator to lib/widgets/shared/
    • Unified jelly physics implementation across BottomBar, TabBar, and SegmentedControl
    • Standardized on LiquidRoundedSuperellipse for smoother indicator shapes

0.1.5-dev.3 #

  • FEAT: Added GlassTabBar widget
    • Horizontal tab navigation bar for page switching
    • Support for icons, labels, or both (icons above labels)
    • Smooth animated indicator with bouncySpring motion
    • Scrollable mode for many tabs (5+)
    • Auto-scroll to selected tab when index changes
    • Sharp text rendering above glass effect
    • Customizable label styles, icon colors, and indicator appearance
    • Dual-mode rendering (grouped/standalone)
    • Supports both quality modes (standard/premium)
    • Comprehensive test coverage (widget + golden tests)
    • Integrated into example app surfaces page with interactive demos

0.1.5-dev.2 #

  • TEST: Added comprehensive test coverage for all widget categories
    • Widget behavior tests for all 15 components (containers, interactive, input, overlays, surfaces)
    • Golden visual regression tests using Alchemist
    • Test utilities and shared helpers for consistent testing patterns
    • Documented shader warnings as expected behavior in test environments

0.1.4 #

  • FEAT: Added GlassSearchBar widget

    • iOS-style search bar with pill-shaped glass design
    • Animated clear button (fades in/out based on text presence)
    • Optional cancel button with slide-in animation (iOS pattern)
    • Auto-focus support and keyboard handling
    • Custom styling options (icons, colors, height)
    • Supports both grouped and standalone modes
  • FEAT: Added GlassSlider widget with iOS 26 Liquid Glass behavior

    • Elongated pill-shaped thumb (2.5x wider for authentic iOS 26 look)
    • Solid white → Pure transparent glass transformation when dragging
    • "Balloons in size" when touched (scales to 135% with easeOutBack curve)
    • Dramatic liquid glass effects during interaction:
      • Refractive index: 1.15 → 1.15 (strong light bending)
      • Chromatic aberration: 0.2 → 0.5 (rainbow edges)
      • Glass transparency: alpha 1.0 → 0.1 (almost invisible)
      • Enhanced glow and shadow when dragging
    • Active track extends under thumb (visible through transparent glass)
    • Thumb positioned slightly below track center (iOS 26 alignment)
    • Jelly physics with dramatic squash/stretch (maxDistortion: 0.25)
    • Continuous and discrete value support with haptic feedback
    • Based on official Apple iOS 26 Liquid Glass specifications
  • FEAT: Added GlassChip widget

    • Pill-shaped chip for tags, filters, and selections
    • Optional leading icon and delete button
    • Selectable state for filter chips with highlight color
    • Dismissible variant with X button and onDeleted callback
    • Composes GlassButton.custom for consistent interaction behavior
    • Auto-sizes to content using IntrinsicWidth/Height
    • Full customization (icon size, spacing, colors, padding)
    • Supports both grouped and standalone modes
  • FEAT: Enhanced example app

    • Added comprehensive input page section for GlassSearchBar
      • Basic search demo
      • Cancel button demonstration
      • Custom styling examples (colors, heights)
      • Interactive search with instructions
    • Added GlassSlider demos to interactive page
      • Basic slider with percentage display
      • Discrete steps with level indicator
      • Custom colors (blue and pink variants)
    • Added GlassChip demos to interactive page
      • Basic chips demonstration
      • Chips with icons (heart, share, star)
      • Dismissible chips with dynamic removal
      • Filter chips with selection state management

0.1.3 #

  • FEAT: Implemented overlay widgets category

    • Added GlassSheet - iOS-style bottom sheet with glass effect and drag indicator
    • Added GlassDialog - Alert dialog with composable design (uses GlassCard + GlassButton)
    • Added GlassDialogAction configuration class for dialog buttons
    • Smart button layouts (horizontal for 1-2 actions, vertical for 3)
    • Support for primary and destructive action styles
  • FEAT: Added GlassIconButton widget

    • Icon-only button optimized for toolbars and app bars
    • Two shape options: circle (default) and rounded square
    • Supports both grouped and standalone modes
    • Full interaction effects (glow, stretch, disabled states)
  • FIX: Improved GlassSegmentedControl border radius calculation

    • Changed indicator radius from borderRadius * 2 to borderRadius - 3
    • Indicator now properly insets from container edges
    • Matches iOS UISegmentedControl visual design
  • FEAT: Enhanced example app

    • Added wallpaper background support (replaces gradient)
    • Added comprehensive overlays page with 5 sheet demos and 4 dialog demos
    • Added icon button examples to interactive page (5 demo cards)
    • Updated glass settings across examples for better visual consistency

0.1.2 #

  • FEAT: Major enhancements to interactive widgets and code architecture
    • Created shared DraggableIndicatorPhysics utility class to eliminate code duplication
    • Fixed GlassBottomBar text rendering to appear above glass for sharp, clear labels
    • Fixed GlassSegmentedControl indicator border radius calculations
    • Added premium quality showcase in example app demonstrating both quality modes
    • Improved tap interaction feedback across all draggable widgets

0.1.1 #

  • FEAT: Implemented GlassSegmentedControl widget

    • iOS-style segmented control with animated glass indicator
    • Draggable indicator with jelly physics and rubber band resistance
    • Velocity-based snapping for natural gesture handling
    • Dual-mode support (grouped and standalone)
    • Full customization options for appearance and behavior
  • 0.1.0 #

  • FEAT: Initial widget library for Apple Liquid Glass

    • Implemented GlassBottomBar with draggable indicator and jelly physics
    • Implemented GlassButton with press effects and glow animations
    • Implemented GlassSwitch with tap toggle functionality
    • Added GlassCard container widget
    • Established dual-mode pattern (grouped and standalone rendering)
    • Added GlassQuality enum for quality mode selection
    • Created comprehensive example app with interactive demonstrations
11
likes
160
points
991
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter UI kit implementing the iOS 26 Liquid Glass design language. Features shader-based glassmorphism, physics-driven jelly animations, and dynamic lighting.

Repository (GitHub)
View/report issues

Topics

#liquid-glass #widget #glassmorphism #flutter #apple

Documentation

API reference

License

MIT (license)

Dependencies

flutter, liquid_glass_renderer, motor

More

Packages that depend on liquid_glass_widgets