perfect_liquid_glass 1.0.1+1
perfect_liquid_glass: ^1.0.1+1 copied to clipboard
A Flutter package to add a beautiful, animated liquid glass lens effect across all platforms using FragmentShaders.
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.