glow_kit 1.0.0
glow_kit: ^1.0.0 copied to clipboard
A customizable Flutter glow animation package that adds smooth, animated background glow effects to any widget with multiple shape support and high-performance rendering.
β¨ Glow Kit #
A powerful, customizable, and high-performance Flutter glow animation package supporting 20+ shapes.
Glow Kit provides a flexible GlowEffect widget that adds smooth, animated glow effects to any widget with full customization and optimized rendering using CustomPainter.
π Why Glow Kit? #
β Smooth & modern glow animations
β 20+ built-in shapes
β Highly customizable
β Optimized for performance
β Easy to use
β Null-safe
β Flutter 3+ compatible
π¦ Installation #
Add this to your pubspec.yaml:
dependencies:
glow_kit: ^1.0.0
Then run:
flutter pub get
π₯ Import #
import 'package:glow_kit/glow_kit.dart';
β‘ Quick Start #
The simplest way to use GlowEffect:
GlowEffect(
glowColor: Colors.blue,
child: const Icon(
Icons.star,
size: 60,
color: Colors.white,
),
)
Thatβs it! π
π§© Complete Example #
Below is a full runnable example:
import 'package:flutter/material.dart';
import 'package:glow_kit/glow_kit.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: GlowDemoPage(),
);
}
}
class GlowDemoPage extends StatefulWidget {
const GlowDemoPage({super.key});
@override
State<GlowDemoPage> createState() => _GlowDemoPageState();
}
class _GlowDemoPageState extends State<GlowDemoPage> {
bool _animate = true;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
body: Center(
child: GlowEffect(
glowColor: Colors.purple,
glowCount: 3,
duration: const Duration(seconds: 2),
startDelay: const Duration(milliseconds: 500),
repeatPauseDuration: const Duration(milliseconds: 300),
glowRadiusFactor: 0.8,
animate: _animate,
repeat: true,
curve: Curves.easeInOut,
shape: GlowShape.hexagon,
child: const Icon(
Icons.favorite,
size: 80,
color: Colors.white,
),
),
),
);
}
}
π¨ Supported Shapes #
Glow Kit supports more than 20 shapes:
π· Basic Shapes #
- Rectangle
- RoundedRectangle
- Circle
- Square
- Oval
- Stadium
- Capsule
πΊ Polygon Shapes #
- Triangle
- Diamond
- Pentagon
- Hexagon
- Octagon
β Star Shapes #
- StarFive
- StarSix
π Decorative Shapes #
- Heart
- Cloud
- Bubble
- Badge
- Shield
π§© Modern UI Shapes #
- CutCorner
- BeveledRect
- Ticket
- Ribbon
βοΈ Properties #
| Property | Type | Description |
|---|---|---|
glowColor |
Color | Color of the glow |
glowCount |
int | Number of glow layers |
glowRadiusFactor |
double | Controls glow expansion scale |
endGlowRadius |
double? | Explicit final glow radius |
duration |
Duration | Animation duration |
startDelay |
Duration | Delay before animation starts |
repeatPauseDuration |
Duration | Pause between animation loops |
animate |
bool | Start or stop animation |
repeat |
bool | Repeat animation |
curve |
Curve | Animation curve |
shape |
GlowShape | Select glow shape |
π Advanced Usage Example #
GlowEffect(
glowColor: Colors.cyan,
glowCount: 4,
glowRadiusFactor: 1.0,
duration: const Duration(seconds: 3),
curve: Curves.elasticOut,
repeat: true,
shape: GlowShape.starFive,
child: Container(
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.black,
borderRadius: BorderRadius.circular(12),
),
child: const Text(
"Glow Kit",
style: TextStyle(
color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
),
)
π― Best Practices #
- Use darker backgrounds for better glow visibility.
- Keep
glowCountbetween 2β4 for optimal performance. - Adjust
glowRadiusFactorcarefully to avoid excessive blur. - Use
animate: falsefor static glow effects.
π Performance Notes #
Glow Kit is optimized using CustomPainter to ensure:
- Minimal rebuilds
- Smooth animations
- High FPS performance
- Efficient glow rendering
π€ Contributing #
Contributions are welcome!
If you find bugs or want to request features:
- Open an issue
- Submit a pull request
π License #
This project is licensed under the MIT License.
π Support #
If you like this package, consider giving it a β on pub.dev and GitHub.
Glow beautifully. Animate smoothly. Build professionally. β¨