Prebuilt animation primitives with timeline sequencing and spring physics
dart pub add philiprehberger_animation_kitPrebuilt animation primitives with timeline sequencing and spring physics
Add to your pubspec.yaml:
dependencies:
philiprehberger_animation_kit: ^0.1.0
Then run:
flutter pub get
import 'package:philiprehberger_animation_kit/animation_kit.dart';
FadeIn(
duration: Duration(milliseconds: 500),
child: Text('Hello, World!'),
)
SlideIn.fromRight(child: Text('From right'))
SlideIn.fromBottom(
duration: Duration(milliseconds: 500),
child: Text('From bottom'),
)
ScaleIn(
curve: Curves.easeOutBack,
child: Icon(Icons.star, size: 48),
)
Bounce(
duration: Duration(milliseconds: 800),
child: Text('Boing!'),
)
Shake(
magnitude: 12.0,
oscillations: 4,
child: Text('Error!', style: TextStyle(color: Colors.red)),
)
Pulse(
minScale: 0.9,
maxScale: 1.1,
child: Icon(Icons.favorite, color: Colors.red, size: 48),
)
AnimationSequence(
staggerDelay: Duration(milliseconds: 150),
children: [
Text('First'),
Text('Second'),
Text('Third'),
],
)
SpringWidget(
target: Offset(100.0, 50.0),
stiffness: 300.0,
damping: 15.0,
child: Container(
width: 60,
height: 60,
decoration: BoxDecoration(
color: Colors.green,
shape: BoxShape.circle,
),
),
)
| Widget | Description |
|---|---|
FadeIn | Fade in a child widget with configurable duration, curve, and delay |
SlideIn | Slide in from a direction (left, right, top, bottom) |
ScaleIn | Scale from 0 to 1 with configurable curve |
Bounce | Scale with elastic overshoot (Curves.elasticOut) |
Shake | Horizontal shake using sine-based offset with decay |
Pulse | Repeating scale animation (grows and shrinks) |
AnimationSequence | Staggered reveal of child widgets in sequence |
SpringWidget | Spring physics positioning with configurable stiffness and damping |
flutter pub get
flutter analyze
flutter test
If you find this project useful: