liquid_glass_plus library

Liquid Glass Effect for Flutter

A high-performance glass/frosted effect renderer using custom shaders.

Impeller Required: Liquid glass rendering requires Impeller to be enabled. On non-Impeller devices (Skia), the effect automatically falls back to fake glass rendering using standard backdrop filters.

Performance: Impeller-based liquid glass provides better visual quality AND better performance than fake glass, because it uses custom shaders that run entirely on the GPU.

Quick Start

LiquidGlassLayer(
  child: LiquidGlass(
    shape: LiquidRoundedRectangle(borderRadius: 20),
    child: Container(width: 100, height: 100),
  ),
)

Optional Features

  • LiquidStretch - Squash/stretch on drag (not required for basic glass)

Classes

FakeGlassConfigs
Configuration specific to fake glass rendering (Skia fallback).
GlassGlow
Represents a layer that can paint a glowing effect below its child.
GlassGlowLayer
Represents a layer that can paint a glowing effect below its child.
LgrLogs
Logging utilities for the Liquid Glass Renderer package.
LiquidGlass
A liquid glass shape.
LiquidGlassConfigs
Configuration specific to Impeller/shader-based liquid glass rendering.
LiquidGlassLayer
Represents a layer of multiple LiquidGlass shapes that have shared LiquidGlassSettings and will be rendered together.
LiquidGlassSettings
Represents the settings for a liquid glass effect.
LiquidOval
Represents an ellipse shape that can be used by a LiquidGlass widget.
LiquidRoundedRectangle
Represents a rounded rectangle shape that can be used by a LiquidGlass widget.
LiquidRoundedSuperellipse
A smooth, continuous-curvature rounded shape (superellipse/squircle).
LiquidShape
Represents a shape that can be used by a LiquidGlass widget.
LiquidStretch
A widget that provides a squash and stretch effect to its child based on user interaction.
LiquidTransform
A Transform wrapper that automatically signals transform state for correct refraction coordinate handling in fake glass mode.
RawLiquidStretch
Use this widget to apply a custom stretch effect in pixels to its child.

Extensions

OffsetResistanceExtension on Offset
Provides withResistance method to apply drag resistance to an Offset.

Properties

debugPaintLiquidGlassGeometry bool
Whether to paint the liquid glass geometry texture for debugging purposes.
getter/setter pair