liquid_glacier 0.0.1 copy "liquid_glacier: ^0.0.1" to clipboard
liquid_glacier: ^0.0.1 copied to clipboard

Apple Liquid Glass design for Flutter Material widgets. Features translucent surfaces, dynamic blur effects, subtle reflections, and depth-based layering.

Liquid Glacier ๐ŸงŠ #

A Flutter package that applies Apple's Liquid Glass design language to Material widgets. Features translucent surfaces, dynamic blur effects, subtle reflections, and depth-based layering.

pub package License: MIT GitHub

Author: Osman Demirรถz

โœจ Features #

  • ๐Ÿ”ฎ Translucent Surfaces - Frosted glass effect using BackdropFilter
  • ๐ŸŽจ Dynamic Blur - Configurable blur intensity (sigma 5-25)
  • โœจ Subtle Reflections - Gradient overlays for glass-like highlights
  • ๐Ÿ“ Depth & Layering - Multi-layer shadows for visual depth
  • ๐ŸŽญ Smooth Animations - Hover, press, and focus state animations
  • ๐ŸŒ“ Light/Dark Mode - Auto-adapts to theme brightness

๐Ÿ“ธ Screenshots #

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5

๐Ÿ“ฆ Installation #

dependencies:
  liquid_glacier: ^0.0.1

๐Ÿš€ Quick Start #

Wrap your app with LiquidGlassTheme to configure the global glass effect:

import 'package:liquid_glacier/liquid_glacier.dart';

void main() {
  runApp(
    LiquidGlassTheme(
      data: LiquidGlassThemeData(
        blurSigma: 12.0,
        opacity: 0.2,
        tintColor: Colors.white,
      ),
      child: MaterialApp(
        home: MyHomePage(),
      ),
    ),
  );
}

๐Ÿงฉ Available Widgets #

Widget Description
LiquidGlassAppBar Translucent app bar with blur
LiquidGlassCard Frosted glass card with hover effects
LiquidGlassButton Button with glow on press
LiquidGlassElevatedButton Elevated button variant
LiquidGlassTextButton Text button variant
LiquidGlassOutlinedButton Outlined button variant
LiquidGlassIconButton Icon button with glass effect
LiquidGlassRadioButton Radio button with glass selection
LiquidGlassTextField Input field with focus glow
LiquidGlassBottomNavigationBar Bottom nav with floating pill indicator
LiquidGlassNavigationBar Material 3 navigation bar
LiquidGlassDialog Dialog with frosted background
LiquidGlassAlertDialog Alert dialog variant
LiquidGlassChip Chip with selection glow
LiquidGlassFilterChip Filter chip variant
LiquidGlassNavigationRail Side navigation rail
LiquidGlassTabBar Tab bar with pill indicator
LiquidGlassSegmentedTabBar Segmented control style
LiquidGlassFAB FAB with glow effect
LiquidGlassDrawer Drawer with blur
LiquidGlassContainer Base glass container

๐ŸŽจ Theme Configuration #

LiquidGlassThemeData(
  blurSigma: 10.0,          // Blur intensity (5-25)
  opacity: 0.15,            // Glass opacity (0.0-1.0)
  borderRadius: BorderRadius.circular(16),
  tintColor: Colors.white,  // Glass tint
  reflectionColor: Colors.white,
  animationDuration: Duration(milliseconds: 200),
  enableReflection: true,   // Gradient overlay
  enableShadow: true,       // Depth shadows
  borderWidth: 0.5,
  borderColor: Colors.white.withOpacity(0.3),
)

๐Ÿ“ฑ Examples #

Glass Card #

LiquidGlassCard(
  onTap: () => print('Tapped!'),
  child: Padding(
    padding: EdgeInsets.all(20),
    child: Text('Glass Card'),
  ),
)

Glass Radio Button #

LiquidGlassRadioButton<int>(
  value: 1,
  groupValue: selectedValue,
  onChanged: (val) => setState(() => selectedValue = val),
  glassColor: Colors.blue,
  label: Text('Option 1'),
)

Glass Button #

LiquidGlassElevatedButton(
  onPressed: () {},
  icon: Icon(Icons.send),
  child: Text('Send'),
)

Glass App Bar #

Scaffold(
  appBar: LiquidGlassAppBar(
    title: Text('My App'),
    actions: [
      LiquidGlassIconButton(
        icon: Icon(Icons.settings),
        onPressed: () {},
      ),
    ],
  ),
  body: ...,
)

Glass Dialog #

showLiquidGlassDialog(
  context: context,
  builder: (context) => LiquidGlassAlertDialog(
    icon: Icon(Icons.check_circle),
    title: Text('Success'),
    content: Text('Operation completed.'),
    actions: [
      LiquidGlassTextButton(
        onPressed: () => Navigator.pop(context),
        child: Text('OK'),
      ),
    ],
  ),
);

๐ŸŽฏ Best Practices #

  1. Use over vibrant backgrounds - Glass effect shines over images/gradients
  2. Keep opacity low - 0.1-0.3 works best for readability
  3. Moderate blur - Sigma 8-15 balances effect and performance
  4. Test on devices - BackdropFilter can be expensive on older devices

๐Ÿ“„ License #

MIT License - see LICENSE for details.

1
likes
150
points
47
downloads

Publisher

unverified uploader

Weekly Downloads

Apple Liquid Glass design for Flutter Material widgets. Features translucent surfaces, dynamic blur effects, subtle reflections, and depth-based layering.

Repository (GitHub)
View/report issues

Topics

#ui #glassmorphism #design #material #apple

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on liquid_glacier