flutter_liquid_glass_kit 1.0.5
flutter_liquid_glass_kit: ^1.0.5 copied to clipboard
iOS 26 Liquid Glass UI kit — native SwiftUI bridge on iOS, graceful glassmorphism fallback on Android.
flutter_liquid_glass_kit #
iOS 26 Liquid Glass UI kit for Flutter.
- iOS → native SwiftUI glass surface. iOS 26+ uses
.glassEffect(); older iOS versions use the system material fallback inside that native surface. - Android → pure-Flutter matte glass by default, or coloured glass when
LiquidGlassSettings.tintColoris supplied.
Widgets #
| Widget | Description |
|---|---|
LiquidGlassCard |
Glass container / card |
LiquidGlassButton |
Pressable glass button with scale feedback |
LiquidGlassNavBar |
Floating glass bottom navigation bar |
Quick start #
import 'package:flutter_liquid_glass_kit/flutter_liquid_glass_kit.dart';
// Card
LiquidGlassCard(
child: Text('Hello, Glass!', style: TextStyle(color: Colors.white)),
)
// Button
LiquidGlassButton(
onPressed: () {},
child: Text('Tap me', style: TextStyle(color: Colors.white)),
)
// Nav bar (inside a Stack)
LiquidGlassNavBar(
currentIndex: _index,
onTap: (i) => setState(() => _index = i),
items: [
LiquidGlassNavItem(icon: Icons.home, label: 'Home'),
LiquidGlassNavItem(
icon: Icons.search,
label: 'Search',
androidIcon: Text('S'),
),
LiquidGlassNavItem(icon: Icons.person, label: 'Profile'),
],
)
Customisation #
All widgets accept a LiquidGlassSettings object:
LiquidGlassCard(
settings: LiquidGlassSettings(
tintColor: Colors.blue,
tintOpacity: 0.20,
blurSigma: 28,
borderOpacity: 0.30,
),
child: ...,
)
Two built-in presets: LiquidGlassSettings.matteLight and LiquidGlassSettings.matteDark.
On Android, omit tintColor for adaptive matte glass:
LiquidGlassCard(
settings: const LiquidGlassSettings(),
child: ...,
)
For scrollable screens with several non-overlapping glass surfaces, wrap the
scrollable in LiquidGlassBackdropGroup. Android shares the backdrop pass and
temporarily uses the matte tint without blur while scrolling:
LiquidGlassBackdropGroup(
settings: const LiquidGlassSettings(
tintColor: Colors.blue,
tintOpacity: 0.24,
),
child: ListView(children: glassCards),
)
Cards, buttons, navigation bars, and direct PlatformGlass descendants inherit
these settings when their own settings argument is omitted. Pass settings
to any individual component to override the group for that component.
Set disableBlurWhileScrolling: false to keep blur active during motion.
Check rendering mode at runtime #
if (isNativeLiquidGlassSupported) {
print('Running the native iOS glass surface');
} else {
print('Running Android Flutter glass');
}
Requirements #
- Flutter ≥ 3.19
- Dart ≥ 3.0
- iOS 16+ (native material; iOS 26+ uses Liquid Glass)
- Android API 21+