rewind method

void rewind()

Implementation

void rewind() {
  if (_history.length > 0 && _animationController.status != AnimationStatus.forward) {
    _animationType = 3;

    final lastHistory = _history[_history.length-1];

    widget.children.add(lastHistory["item"]);
    _animationX = Tween<double>(begin: lastHistory["left"], end: 0).animate(_animationController);
    _animationY = Tween<double>(begin: lastHistory["top"], end: 0).animate(_animationController);
    if (widget.maxAngle > 0)
      _animationAngle = Tween<double>(begin: lastHistory["angle"], end: 0).animate(_animationController);

    _animationController.forward();
  }
}