glass_liquid_navbar 0.1.1
glass_liquid_navbar: ^0.1.1 copied to clipboard
A stunning iOS 26-inspired liquid glass bottom navigation bar with buttery-smooth animations and frosted glass morphism for Flutter.
glass_liquid_navbar #
iOS 26-inspired liquid glass bottom navigation for Flutter. Buttery-smooth spring physics, real backdrop blur, and a morphing liquid indicator — zero dependencies beyond Flutter itself.
✨ Features #
| Feature | Details |
|---|---|
| 🌊 Liquid indicator | Blob stretches & morphs as it travels between tabs using spring physics |
| 🪟 Real glass blur | BackdropFilter + layered gradients for authentic frosted-glass depth |
| 💫 Bounce animation | Each icon bounces on selection with a tuned spring TweenSequence |
| 🔵 Ripple tap feedback | Radial ripple on every press |
| 🎨 Fully themeable | LiquidGlassTheme exposes every visual parameter; ships with light & dark presets |
| 🏷️ Animated labels | Proximity-based colour lerp — labels fade in as the indicator approaches |
| 🔴 Badge support | Dot (count 0) and numeric (count 1–99+) badges per tab |
| 📱 Safe-area aware | Works with Scaffold(extendBody: true) for true floating pill feel |
| ♿ Accessible | Semantic labels pass through to screen readers |
| 0️⃣ Zero dependencies | Only flutter SDK required |
🚀 Getting started #
dependencies:
glass_liquid_navbar: ^0.1.0
import 'package:glass_liquid_navbar/glass_liquid_navbar.dart';
📖 Basic usage #
Scaffold(
extendBody: true, // ← lets the bar float over content
body: _pages[_index],
bottomNavigationBar: LiquidGlassNavbar(
currentIndex: _index,
onTap: (i) => setState(() => _index = i),
items: const [
LiquidNavItem(icon: Icons.home_rounded, label: 'Home'),
LiquidNavItem(icon: Icons.search_rounded, label: 'Search'),
LiquidNavItem(icon: Icons.add_circle_rounded, label: 'Create'),
LiquidNavItem(icon: Icons.notifications_rounded, label: 'Alerts', badge: 3),
LiquidNavItem(icon: Icons.person_rounded, label: 'Profile'),
],
),
)
🎨 Theming #
LiquidGlassNavbar(
theme: const LiquidGlassTheme(
glassBlur: 28, // backdrop blur sigma
glassColor: Color(0x30FFFFFF),
borderRadius: 34,
pillHeight: 72,
selectedColor: Colors.white,
unselectedColor: Color(0x60FFFFFF),
indicatorColor: Color(0x40FFFFFF),
shadowBlurRadius: 48,
),
...
)
Dark-mode preset #
LiquidGlassNavbar(
theme: LiquidGlassTheme.dark(),
...
)
🔧 API reference #
LiquidGlassNavbar #
| Parameter | Type | Default | Description |
|---|---|---|---|
items |
List<LiquidNavItem> |
required | 2–6 tabs |
currentIndex |
int |
required | Active tab index |
onTap |
ValueChanged<int> |
required | Tab selected callback |
theme |
LiquidGlassTheme |
LiquidGlassTheme() |
Visual configuration |
showLabels |
bool |
true |
Show text labels |
animationDuration |
Duration |
400ms |
Spring animation duration |
floatingOffset |
double |
12.0 |
Gap above safe-area bottom |
LiquidNavItem #
| Parameter | Type | Description |
|---|---|---|
icon |
IconData? |
Unselected icon (required if no customIcon) |
activeIcon |
IconData? |
Optional alternate icon when selected |
customIcon |
Widget? |
Fully custom widget (SVG, image, etc.) |
label |
String |
Tab label |
badge |
int? |
0 = dot, >0 = count, null = hidden |
LiquidGlassTheme #
All properties have sensible defaults. Refer to the class dartdoc for the full list.
🛠️ Tips #
- Set
Scaffold(extendBody: true)so page content scrolls behind the bar — the blur will composite the real content beneath. - For a pure dark or AMOLED background, use
LiquidGlassTheme.dark(). - Pair with
PageView+PageControllerfor swipe-to-navigate with synced indicator. - Use
activeIconto swap to a filled variant of the icon when selected (e.g.Icons.home_outlined→Icons.home_rounded).
📄 License #
MIT © 2026 Abhay Patel