glass_morph_widgets
A pure-Dart, cross-platform Flutter package providing animated glass-morphism widgets: GlassMorphButton, GlassMorphCard, GlassMorphFloatingActionButton.
Demo
Live demo showcasing all glass-morphism widgets
Features
- Animated blur + scale interactions
- Pure Dart (no native plugins) — works on mobile, desktop & web (HTML/CanvasKit)
- Accessible defaults (Semantics, contrast)
- Golden-file tests for visual regression
- CI/CD pipeline with GitHub Actions
Screenshots
GlassMorphButton
GlassMorphCard
GlassMorphFloatingActionButton
Installation
Add to your pubspec.yaml:
dependencies:
glass_morph_widgets: ^1.0.0
Quick example
import 'package:glass_morph_widgets/glass_morph_widgets.dart';
GlassMorphButton(
onPressed: () {},
child: Text('Upgrade to Pro'),
);
Running tests & goldens
-
Generate golden baselines:
flutter test --update-goldens
-
Run tests:
flutter test dart analyze
CI
- CI should run
flutter test
and fail on visual diffs. Do not run--update-goldens
in CI.
Contributing
- Follow Conventional Commits.
- Run
dart format .
anddart analyze
before committing.
License
MIT License — see LICENSE.
Libraries
- glass_morph_widgets
- Public API for the glass_morph_widgets package.