createAnimation method

Animation<Alignment> createAnimation()

Called to create the animation that exposes the current progress of the transition controlled by the animation controller created by createAnimationController().

Implementation

Animation<Alignment> createAnimation() {
  assert(!_transitionCompleter.isCompleted,
      'Cannot reuse a $runtimeType after disposing it.');
  assert(_controller != null);
  return AlignmentTween(begin: _initialAlignment, end: _endAlignment).animate(
    CurvedAnimation(
      parent: _controller!,
      curve: flushbar.forwardAnimationCurve,
      reverseCurve: flushbar.reverseAnimationCurve,
    ),
  );
}