ios_liquid_glass

Apple's native iOS 26 Liquid Glass for Flutter — real UIGlassEffect surfaces and the real UITabBarController tab bar — plus an Impeller liquid lens tier for the iridescent droplet bottom nav that refracts Flutter content (rainbow rim, jelly morph), and glass header controls (badged icon buttons, capsules, grouped actions) for transparent app bars.

Impeller liquid droplet mid-morph over the tab bar, refracting the album tiles behind it with a rainbow rim Home tab: real native iOS 26 tab bar plus LiquidGlassButton and LiquidGlassIconButton variants

Left — liquid tier: the Impeller droplet caught mid-morph on the example's Droplet lens page. This is real refraction of Flutter pixels: "Night Swim" bends through the lens and the rim splits the backdrop into a rainbow. Right — native tier: Apple's real UITabBarController and UIGlassEffect buttons/cards on iOS 26.

The liquid droplet jelly-morphing between tabs, squashing and stretching while it refracts the album art behind the bar

The jelly morph between tabs (LiquidGlassBottomNav.liquid), recorded on the iOS 26.2 Simulator. The droplet squash-stretches with spring physics and keeps refracting the page content the whole way.

Close-up of the droplet lens mid-travel: the chromatic-aberration rim splits the backdrop colors like a prism

Lens close-up: chromatic aberration splits the backdrop like a prism. Tune the rim strength with chromaticAberration (default 0.02; the shots here use 0.06).

A pushed route: the native tab bar hides itself automatically, no route bookkeeping in the host app Favorites tab showing a tab badge and glass list rows

The native tier in motion: pushing any route hides the system tab bar with zero manual wiring — see LiquidGlassNavigatorObserver — and declarative badges render on the real UITabBar. The Simulator exaggerates native glass artifacts more than a device does — see Native glass rules.

Tier When Rendering
liquid LiquidGlassBottomNav.liquid / preferLiquid: true Impeller live-backdrop droplet (needs Impeller)
native iOS 26+ default Native UIGlassEffect platform view / system UITabBar
plain everything else Flutter-drawn frosted glass (or a solid fill), identical layout

How native glass sees Flutter: a UIGlassEffect view blurs (regular) or bends (clear) the Flutter content drawn beneath it, live as that content scrolls. It can't be faded or masked from Flutter, and each control is its own native view — see Native glass rules. For the iridescent droplet with chromatic aberration and magnification, use the liquid tier.

Install

dependencies:
  ios_liquid_glass: ^0.10.0

Host app requirements

  • iOS Info.plist — enable platform views (native tier) and Impeller (liquid tier):
    <key>io.flutter.embedded_views_preview</key>
    <true/>
    <key>FLTEnableImpeller</key>
    <true/>
    
  • iOS 26+ SDK on the build machine for native glass (deployment target can stay lower).
  • Full restart after enabling Impeller (hot reload is not enough).

Usage

Register the package observer once — this alone makes the native bar hide on any pushed route (PIN, Order New Card, a details page, ...) and reappear on pop, with no per-route bookkeeping:

MaterialApp(
  navigatorObservers: [LiquidGlassNavigatorObserver.instance],
  // or with a router:
  // routerDelegate: appRouter.delegate(
  //   navigatorObservers: () => [LiquidGlassNavigatorObserver.instance],
  // ),
  home: const RootTabs(),
)

Then build the tab host:

import 'package:ios_liquid_glass/ios_liquid_glass.dart';

LiquidGlassTabScaffold(
  currentIndex: index,
  onIndexChanged: (i) => setState(() => index = i),
  destinations: [
    LiquidGlassTabDestination(
      title: 'Home',
      systemImage: 'house',
      selectedSystemImage: 'house.fill',
      icon: const Icon(Icons.home_outlined),
      selectedIcon: const Icon(Icons.home),
      page: const HomePage(),
    ),
    LiquidGlassTabDestination(
      title: 'Search',
      systemImage: 'magnifyingglass',
      icon: const Icon(Icons.search),
      page: const SearchPage(),
    ),
  ],
)

For hiding driven by app state instead of (or in addition to) route pushes — a PIN screen or blur overlay modeled as a flag rather than a route — add barVisible and/or shouldHideOverlay:

LiquidGlassTabScaffold(
  currentIndex: index,
  onIndexChanged: (i) => setState(() => index = i),
  barVisible: !isPinOpen,                          // app-driven flag
  shouldHideOverlay: () => isPinOpen || isBlurOpen, // same-frame check
  overlayListenable: router,                        // extra listenable to resync on
  destinations: [ /* ... */ ],
)

Use .shell when you already own the page stack:

LiquidGlassTabScaffold.shell(
  currentIndex: index,
  onIndexChanged: onIndexChanged,
  themeBuilder: (context) => LiquidGlassTheme.adaptive(context),
  overlayListenable: router,
  nativeTabs: [...],
  fallbackItems: [...],
  child: yourBody,
)

Scroll views should use MediaQuery.paddingOf(context).bottom (applied automatically when applyContentInset: true).

Liquid droplet bottom nav (matches the morphing lens look)

import 'package:ios_liquid_glass/ios_liquid_glass.dart';

Scaffold(
  body: Stack(
    fit: StackFit.expand,
    children: [
      Padding(
        padding: EdgeInsets.only(
          bottom: LiquidGlassBottomNav.contentBottomClearance(context),
        ),
        child: yourPage,
      ),
      LiquidGlassBottomNav.liquid(
        currentIndex: index,
        onIndexChanged: (i) => setState(() => index = i),
        items: [
          LiquidGlassNavItem.custom(
            iconBuilder: (context, g) => SvgPicture.asset(
              g.selected ? 'assets/home_fill.svg' : 'assets/home.svg',
              width: g.size,
              height: g.size,
              colorFilter: ColorFilter.mode(g.color, BlendMode.srcIn),
            ),
          ),
          // ...
        ],
      ),
    ],
  ),
);

Tune the rainbow rim with chromaticAberration (default 0.02; the README shots use 0.06). See the Droplet lens page in example/lib/main.dart (DropletNavDemoPage) for the exact setup behind the screenshots.

Glass header controls

Content scrolls under a transparent header; the controls float over it:

// Follow the app's own light/dark setting, not the system appearance.
const glass = LiquidGlassStyle(
  nativeInterfaceStyle: LiquidGlassInterfaceStyle.theme,
);

final top = MediaQuery.paddingOf(context).top;

Stack(
  children: [
    ListView(padding: EdgeInsets.only(top: top + 60), children: items),
    // Soft iOS 26 edge under the header. Flutter-drawn, so the glass
    // above samples the blurred result.
    LiquidGlassScrollEdgeEffect(height: top + 56),
    Positioned(
      top: top,
      left: 12,
      right: 12,
      height: 44,
      child: Row(
        children: [
          LiquidGlassIconButton(
            size: 40,
            style: glass,
            icon: const Icon(Icons.arrow_back_ios_new),
            semanticLabel: 'Back',
            onPressed: () => Navigator.maybePop(context),
          ),
          const Spacer(),
          LiquidGlassIconButton(
            size: 40,
            style: glass,
            icon: const Icon(Icons.support_agent),
            semanticLabel: 'Support',
            badge: const LiquidGlassBadge.dot(semanticLabel: 'New reply'),
            onPressed: openSupport,
          ),
          const SizedBox(width: 8),
          LiquidGlassIconButton(
            size: 40,
            style: glass,
            icon: const Icon(Icons.notifications_none),
            semanticLabel: 'Notifications',
            badge: LiquidGlassBadge.count(unread), // hidden at 0
            onPressed: openNotifications,
          ),
        ],
      ),
    ),
  ],
)
  • Theme. nativeInterfaceStyle is applied to native glass as overrideUserInterfaceStyle: .theme follows Theme.of(context), .light / .dark force it, and .system (the default) follows the OS. Changes update the live view in place: no rebuild, no empty frame. iOS 26 glass also adapts to the brightness of the content behind it, so after a theme switch it eases to the new page with the system's own transition, and small controls asked to be dark over a light backdrop settle back to light glass.
  • Badges. LiquidGlassBadge.dot() and LiquidGlassBadge.count(n) (shows 99+ above maxCount). They're centered on the glass rim at badgeAlignment (default AlignmentDirectional.topEnd), drawn outside the glass clip, shifted by badgeOffset (positive dx moves toward the end edge), mirrored in right-to-left layouts, and read after the button's label.
  • Capsules. LiquidGlassButton(height: 40, child: ...) hugs its content; pass width for a fixed size.
  • Hit targets. minTapTargetSize (default 44) lets a 36–40 pt button take taps across 44 × 44 without changing layout. Only the area inside the enclosing row counts, so keep that row at least 44 pt tall.
  • Disabled. onPressed: null dims the button's content; the glass stays intact.
  • Grouped actions. LiquidGlassActionGroup puts several icon actions in one capsule and one native view, each with its own hit target, semantics, and badge.
  • Show and hide. LiquidGlassVisibility(visible: ..., child: ...) scales glass in and out. Never fade it.

Glass cards and containers

LiquidGlassContainer(
  borderRadius: 24,
  style: const LiquidGlassStyle(
    nativeVariant: NativeGlassVariant.clear,
  ),
  child: const Text('Hello, glass'),
)

Fallback look (Android, iOS below 26)

Without native glass, surfaces and buttons draw translucent frosted glass: a light or dark tint over a blur, with a hairline border and a soft top highlight. The colors are LiquidGlassTheme tokens; provide them app-wide with LiquidGlassThemeScope:

LiquidGlassThemeScope(
  theme: const LiquidGlassTheme(
    fallbackTintLight: Color(0x59FFFFFF),
    fallbackTintDark: Color(0x66000000),
  ),
  child: child,
)

Per surface, LiquidGlassStyle offers plainColor (tints the blur), frostedBlurSigma, frostedTintOpacity, frostedBorderWidth, and frostedHighlight. Set frostedFallback: false for a solid fill instead.

Capability detection

if (LiquidGlassPlatform.supportsLiquidLens) { ... }
if (LiquidGlassPlatform.supportsNativeGlass) { ... } // iOS 26+

The real system tab bar (advanced)

LiquidGlassNativeTabShell overlays Apple's actual UITabBarController (iOS 26+) — see previous docs / example for install, badges, route sync, and modals.

Native glass rules

Native glass is a UIKit view composited with Flutter's output, and UIKit renders it correctly only under a few conditions. The package's widgets follow them; the code around them has to as well.

  • No alpha on the glass or any parent. Opacity, AnimatedOpacity, FadeTransition, and fade-style page transitions switch the effect off while they run, and the content behind shows through sharp. Show and hide glass with LiquidGlassVisibility.
  • No masks on parent views. A Flutter clip around glass (ClipRRect, ClipOval, ClipPath, or any clip that cuts through it) becomes a mask on the glass view's parent. Glass widgets get their rounded shape from UIKit, so don't wrap them in clips.
  • One native view per control. Every glass button or surface is its own platform view with its own compositing cost. Group icon clusters with LiquidGlassActionGroup, and avoid dozens of glass surfaces in long lists.
  • Flutter effects go beneath the glass. Native glass samples Flutter content drawn under it, but Flutter can't blur or mask a UIKit view: keep BackdropFilters, including LiquidGlassScrollEdgeEffect, below glass controls.
  • Judge visuals on a device. The iOS Simulator exaggerates native glass artifacts.

Known limitations

  • Native glass can't be faded or masked from Flutter (see the rules above).
  • LiquidGlassStyle.nativeInteractive is deprecated: Flutter handles the touches, so the native interactive glass response never triggers. Press feedback comes from the Flutter buttons.
  • There's no adaptive foreground: native glass doesn't report what it samples, so icon and label colors come from your theme.
  • Liquid tier needs Impeller; on Skia/Web it falls back to a frosted bar.
  • Custom native-tab icons must be pre-rasterized PNG bytes.

Example

example/lib/main.dart — a four-tab LiquidGlassTabScaffold (Home, Search, Favorites, Profile) wired the way a host app is meant to: LiquidGlassNavigatorObserver registered once on the MaterialApp, a Navigator.push from Home that hides the bar with no extra code, a barVisible toggle for app-driven hiding (PIN screens, blur overlays), declarative tab badges, and the button/icon-button gallery from the screenshots above. Native tab shell on iOS 26+, Flutter fallback bars everywhere else.

The Liquid droplet nav button on Home pushes DropletNavDemoPage — the page behind the hero shots: LiquidGlassBottomNav.liquid stacked over a colorful library grid so the droplet has real content to refract (the system bar hides itself for the pushed route, so the two bars never fight).

The Header glass button pushes HeaderGlassDemoPage: a transparent two-row header over a scrolling colorful list with a back button, search and Upgrade capsules, support (dot) and notification (count) badges, disabled buttons, a grouped capsule, and the scroll-edge effect. Switches in the list flip the in-app theme (the glass follows it), right-to-left layout, and the Upgrade capsule's alpha-free show/hide.

cd example
flutter run

Libraries

ios_liquid_glass
Apple's native iOS 26 Liquid Glass (UIGlassEffect and UITabBarController) for Flutter, plus an Impeller liquid-lens tier for iridescent droplet nav that refracts Flutter content.
ios_liquid_glass_method_channel
ios_liquid_glass_platform_interface