player_animation 1.0.0 player_animation: ^1.0.0 copied to clipboard
A powerful Flutter animation widget that simplifies creating animations without AnimationController boilerplate. Supports loop animations, play/pause control, and custom builders.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:player_animation/player_animation.dart';
void main() {
runApp(const AnimationExample());
}
class AnimationExample extends StatefulWidget {
const AnimationExample({super.key});
@override
State<AnimationExample> createState() => _AnimationExampleState();
}
class _AnimationExampleState extends State<AnimationExample> {
@override
Widget build(BuildContext context) {
return Directionality(
textDirection: TextDirection.ltr,
child: Scaffold(
body: AnimationPlayer(
begin: 100,
end: 200,
duration: const Duration(seconds: 1),
play: true,
loop: true,
builder: (context, controller, child, animation) {
return Center(
child: Container(
width: animation.value,
height: animation.value,
color: Colors.red,
),
);
}),
),
);
}
}