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.