perfect_liquid_glass

A Flutter package that brings a beautiful, animated liquid-glass shader effect to your app. Works on Android, iOS, Web, macOS, Windows, and Linux!

This package is in experimental stage, don't use this right now.


✨ Features

  • 💧 Touch-responsive distortion
  • 🧊 Circular or rounded rectangle lens shapes
  • 💡 Dynamic shimmer/lighting animation
  • 🎯 FragmentShader-powered and super smooth
  • 🌐 Cross-platform (mobile + desktop + web)

🚀 Getting Started

1. Add to pubspec.yaml

dependencies:
  perfect_liquid_glass: ^1.0.0

2. Import

import 'package:perfect_liquid_glass/perfect_liquid_glass.dart';

3. Use the Widget

LiquidGlassShaderWidget(
  assetImages: [
    'assets/images/bg1.png',
    'assets/images/bg2.webp',
  ],
  shape: 0.0, // 0.0 = circle, 1.0 = rounded rectangle
)

📂 Required Asset Setup

pubspec.yaml

flutter:
  assets:
    - assets/shaders/liquid_glass.frag
    - assets/images/bg1.png
    - assets/images/bg2.webp

Make sure the shader and images exist in your asset folder.


🖼 Screenshot

Add a demo screenshot or GIF here.


🧠 API

Property Type Description
assetImages List<String> List of images used as background
shape double 0.0 = circle, 1.0 = rounded rectangle

📦 Platform Support

  • ✅ Android
  • ✅ iOS
  • ✅ Web
  • ✅ macOS
  • ✅ Windows
  • ✅ Linux

📜 License

MIT License.
See the LICENSE file for full details.