OffsetAnimation constructor
OffsetAnimation({
- Key? key,
- double end = 15.0,
- required AnimationController animationController,
- required Widget widget,
Implementation
OffsetAnimation({
Key? key,
this.end = 15.0,
required this.animationController,
required this.widget,
}) : super(
key: key,
listenable:
Tween(begin: 0.0, end: end).chain(CurveTween(curve: Curves.elasticIn)).animate(animationController)
..addStatusListener((status) {
if (status == AnimationStatus.completed) animationController.reverse();
}));