Animated Buttons Package 🎮
A collection of highly customizable animated buttons with modern visual effects for Flutter applications.
Features ✨
- 11+ Animation Effects
- Particle explosions 💥
- Liquid fill animations 🌊
- Holographic scanlines 🌈
- Glassmorphism effects 🥃
- Neon glow effects 💡
- Scale animations 📏
- Shimmer effects ✨
- Customizable States
- Loading states 🔄
- Disabled states ⚠️
- Hover states 🖱️
- Press states 👇
- Performance Optimized ⚡
- Repaint boundaries
- Lifecycle-aware animations
- Efficient particle system
Installation 📦
Add to your pubspec.yaml:
dependencies:
animated_buttons: ^1.0.0
import 'package:animated_buttons/animated_button.dart';
Basic Usage 🚀
AnimatedButton(
onPressed: () => print('Button pressed!'),
baseColor: Colors.blue,
highlightColor: Colors.lightBlue,
child: const Text('Tap Me'),
)
Complete Example 🎨
AnimatedButton(
onPressed: () {},
enableParticles: true,
enableLiquidFill: true,
glassIntensity: 0.2,
baseColor: Colors.black.withOpacity(0.3),
highlightColor: const Color(0xFF08F7FE),
borderRadius: BorderRadius.circular(20),
child: const Text(
'Cyber Button',
style: TextStyle(
color: Color(0xFF08F7FE),
fontWeight: FontWeight.bold,
),
),
)
Advanced Customization 🛠️
Neon Style Button
AnimatedButton(
glassIntensity: 0,
borderWidth: 2,
baseColor: Colors.transparent,
highlightColor: Colors.pink,
borderColor: Colors.pink,
child: const Text('NEON'),
)
Loading State
bool _isLoading = false;
AnimatedButton(
onPressed: () => setState(() => _isLoading = true),
child: _isLoading
? const CircularProgressIndicator()
: const Text('Loading'),
)
Disabled State
AnimatedButton(
onPressed: null,
baseColor: Colors.grey,
child: const Text('Disabled'),
)
Performance Tips ⚡
-
Use glassIntensity: 0 for buttons without blur effects
-
Disable particles when not needed (enableParticles: false)
-
Limit hologram effects to 1-2 buttons per screen
-
Use RepaintBoundary for complex layouts
Support the package
If you find this package useful, you can support it for free by giving it a thumbs up at the top of this page. Here's another option to support the package: