flipLeft method

void flipLeft()

Flips the Flipper to the Left for one time. Only works with DragAxis.horizontal and DragAxis.both.

Implementation

void flipLeft() {

  assert(_state != null,
  'Controller not attached to any Flipper. Seems that you forget to attach controller to Flipper.');
  assert((dragAxis!=DragAxis.vertical),
  'Cannot call flipLeft() when the dragAxis is set to DragAxis.vertical!'
      '\nUse DragAxis.horizontal or DragAxis.both');

  ///For DragAxis.both
  ///Initialising the unused animation with the current value.
  if(dragAxis==DragAxis.both) {
    _state!.animationVertical =
        AlwaysStoppedAnimation<double>(_state!.dragVertical);
  }


  _state!.animationHorizontal= Tween<double>(
    begin: _state!.isFront?0:180,
    end: _state!.isFront?180:360,
  ).animate(_state!.animationController);
  if(_state!.isInverted) {
    _state!.animationController.reverse(from: 1.0);
  }else{
    _state!.animationController.forward(from: 0.0);
  }

}