philiprehberger_animation_kit 0.4.0 copy "philiprehberger_animation_kit: ^0.4.0" to clipboard
philiprehberger_animation_kit: ^0.4.0 copied to clipboard

Prebuilt animation primitives with timeline sequencing and spring physics

philiprehberger_animation_kit #

Tests pub package Last updated

Prebuilt animation primitives with timeline sequencing and spring physics

Requirements #

  • Flutter >= 3.29
  • Dart >= 3.6

Installation #

Add to your pubspec.yaml:

dependencies:
  philiprehberger_animation_kit: ^0.4.0

Then run:

flutter pub get

Usage #

import 'package:philiprehberger_animation_kit/animation_kit.dart';

FadeIn(
  duration: Duration(milliseconds: 500),
  child: Text('Hello, World!'),
)

Slide In #

SlideIn.fromRight(child: Text('From right'))
SlideIn.fromBottom(
  duration: Duration(milliseconds: 500),
  child: Text('From bottom'),
)

Scale In #

ScaleIn(
  curve: Curves.easeOutBack,
  child: Icon(Icons.star, size: 48),
)

Bounce #

Bounce(
  duration: Duration(milliseconds: 800),
  child: Text('Boing!'),
)

Shake #

Shake(
  magnitude: 12.0,
  oscillations: 4,
  child: Text('Error!', style: TextStyle(color: Colors.red)),
)

Pulse #

Pulse(
  minScale: 0.9,
  maxScale: 1.1,
  child: Icon(Icons.favorite, color: Colors.red, size: 48),
)

Reverse & onComplete #

FadeIn(
  reverse: true,
  onComplete: () => print('Done!'),
  child: Text('Fading out'),
)

Status Callbacks #

FadeIn(
  onStatusChanged: (status) => print('Status: $status'),
  child: Text('Tracked'),
)

Preset Curves #

import 'package:philiprehberger_animation_kit/animation_kit.dart';

ScaleIn(
  curve: KitCurves.softSpring,
  child: Icon(Icons.check_circle, size: 48),
)

SlideIn.fromBottom(
  curve: KitCurves.gentleEntry,
  child: Card(child: Text('Card')),
)

Animation Chain #

AnimationChain(
  stepDuration: Duration(milliseconds: 400),
  children: [
    Text('Step 1'),
    Text('Step 2'),
    Text('Step 3'),
  ],
)

Repeat Animation #

RepeatAnimation(
  count: 3,
  reverse: true,
  child: Icon(Icons.notifications, size: 32),
)

Animated Visibility #

AnimatedVisibility(
  visible: _isVisible,
  duration: Duration(milliseconds: 300),
  child: Text('Now you see me'),
)

Animation Sequence #

AnimationSequence(
  staggerDelay: Duration(milliseconds: 150),
  children: [
    Text('First'),
    Text('Second'),
    Text('Third'),
  ],
)

Animation Delay #

AnimationDelay(
  delay: Duration(milliseconds: 500),
  duration: Duration(milliseconds: 300),
  child: Text('Appears after 500ms'),
)

Spring Physics #

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,
    ),
  ),
)

API #

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)
AnimationChain Sequential multi-child animations with fade and slide
RepeatAnimation Looping opacity animation with optional repeat count
AnimatedVisibility Boolean-driven fade in/out with layout removal
AnimationDelay Delays child appearance then fades in with configurable duration
AnimationSequence Staggered reveal of child widgets in sequence
SpringWidget Spring physics positioning with configurable stiffness and damping
KitCurves Preset Curve constants: gentleEntry, elasticBounce, smoothExit, softSpring
onStatusChanged (param) Optional void Function(AnimationStatus)? on FadeIn, SlideIn, ScaleIn for fine-grained status updates

Development #

flutter pub get
flutter analyze
flutter test

Support #

If you find this project useful:

Star the repo

🐛 Report issues

💡 Suggest features

❤️ Sponsor development

🌐 All Open Source Projects

💻 GitHub Profile

🔗 LinkedIn Profile

License #

MIT

2
likes
160
points
10
downloads

Documentation

API reference

Publisher

verified publisherphiliprehberger.com

Weekly Downloads

Prebuilt animation primitives with timeline sequencing and spring physics

Homepage
Repository (GitHub)
View/report issues

Topics

#animation #widget #effects

License

MIT (license)

Dependencies

flutter

More

Packages that depend on philiprehberger_animation_kit