Skip to content
pubscout

glass

3.0.1, released 6 days ago by zac.ac

Turn any widget into frosted glass or Apple-style liquid glass with a single asGlass() call.

WASM-ready
$ flutter pub add glass
Source repository

What it does

Converts any standard Flutter widget into a glassmorphic element using a backdrop blur, tint, and frosted noise texture. It also supports experimental Apple-style liquid glass effects with edge refraction and rim lighting.

AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to implement glassmorphism design or Apple-style liquid glass effects on UI elements.
  • You need to blur background content behind cards, bottom sheets, or navigation bars.

Skip it when

  • You need complex physics-based continuous squircle shapes instead of standard circular or elliptical corner arcs.
  • You have many overlapping glass elements without grouping, which can severely impact scrolling performance.

Strengths

  • Extremely simple API accessed via an extension method (.asGlass()).
  • Supports performance optimization for lists and multiple instances via BackdropGroup.
  • Safe fallback to plain blur on web and Skia renderers when fragment shaders aren't available.

Weaknesses

  • Liquid glass refraction and rim features require Impeller and are not fully functional on the Skia renderer or web.
  • Multiple unoptimized glass widgets on screen can hurt scrolling performance.
  • Corners use circular or elliptical arcs rather than Apple's continuous squircle shape.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Requires Flutter 3.29 or newer. Optional precaching can be done via LiquidGlass.precache() in main().

Container(
    child: someChild,
).asGlass()

Alternatives

Packages that do the same job and could replace glass.

  • glassmorphism

    Create glassmorphic frosted glass containers with backdrop blur and gradient borders.

  • blurrycontainer

    Creates a frosted glass effect container with blur, color, elevation, and padding.

  • blurbox

    A Flutter package that applies customizable blur effects to its child widgets.

  • oc_liquid_glass

    Create realistic liquid glass droplet effects with GPU-accelerated shaders in Flutter.