OffsetAnimation constructor

OffsetAnimation({
  1. Key? key,
  2. double end = 15.0,
  3. required AnimationController animationController,
  4. 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();
                }));