Skip to main content

liquid_glass_vivid 0.1.0-dev.2 copy "liquid_glass_vivid: ^0.1.0-dev.2" to clipboard
liquid_glass_vivid: ^0.1.0-dev.2 copied to clipboard

Liquid glass navigation and buttons for Flutter, with draggable lenses, bottom and side layouts, background refraction, and renderer fallbacks.

Liquid Glass Vivid #

Live demo · pub.dev · 中文

A Flutter liquid glass kit with navigation, buttons, surfaces, bottom and side layouts, a draggable lens, and background refraction. Supports light/dark themes, RTL, and reduced motion. Requires Flutter 3.41+ and Dart 3.11+; depends only on the Flutter SDK.

Real Android device: lens dragging and focus-page scrolling behind the glass bar

Full-resolution static screenshot · Pressed lens · Background scrolling

Version 0.1.0-dev.2 adds glass buttons with a complete runnable example.

Get started #

Add the preview release:

dependencies:
  liquid_glass_vivid: ^0.1.0-dev.2

Import package:liquid_glass_vivid/liquid_glass_vivid.dart and place this in a bounded area such as Scaffold.body. Your widget owns selected and pages:

LiquidGlassLayout(
  body: pages[selected],
  navigation: LiquidGlassNavigation(
    destinations: const [
      LiquidGlassDestination(label: 'Home', icon: Icons.home_rounded),
      LiquidGlassDestination(label: 'Explore', icon: Icons.explore_rounded),
      LiquidGlassDestination(label: 'Settings', icon: Icons.settings_rounded),
    ],
    selectedIndex: selected,
    onSelected: (index) => setState(() => selected = index),
  ),
)

Allow scrollable content to extend behind the bar and add padding at its end. Dragging previews the selection; releasing commits it. A tap moves the lens to the destination before committing.

Options #

Option Purpose
axis: Axis.vertical Side rail; set on both layout and navigation
selectionColor Selected color; defaults to ColorScheme.primary
unselectedColor, labelStyle, showLabels Icons and labels
tint: 0…1 Clear to frosted background; lens stays clear
enableFeedback Button and selection haptics
quality: LiquidGlassCaptureQuality.balanced Optional lower-cost background sampling on the layout

Validation and performance #

  • Analysis, 40 package tests and two example tests passed on the pinned Flutter 3.41.10 SDK; Android Profile multi-button scrolling was measured.
  • Default quality preserves device pixel ratio. Balanced quality caps background sampling at DPR 2 with a 33 ms minimum update interval.
  • Device measurements and reproduction document frame times, process memory and limitations; 60/120 fps is not certified. Published-version dual-SDK CI results are in the validation coverage.

See implementation and limitations, validation coverage, and the runnable example.

Licensed under MIT.

0
likes
0
points
131
downloads

Publisher

unverified uploader

Weekly Downloads

Liquid glass navigation and buttons for Flutter, with draggable lenses, bottom and side layouts, background refraction, and renderer fallbacks.

Homepage
Repository (GitHub)
View/report issues

Topics

#liquid-glass #navigation #widget

License

unknown (license)

Dependencies

flutter

More

Packages that depend on liquid_glass_vivid