reverse method

Future<void> reverse()

Implementation

Future<void> reverse() async {
  final tween = Tween<double>(
    begin: 0,
    end: _controller.value,
  );
  _animation = _controller
      .drive(
        CurveTween(
          curve: Interval(
            tween.begin!,
            tween.end!,
            curve: reverseCurve,
          ),
        ),
      )
      .drive(tween);
  await _controller.reverse();
  _animation = _controller;
}