flipDown method

void flipDown()

Flips the Flipper to the Bottom for one time. Only works with DragAxis.vertical and DragAxis.both.

Implementation

void flipDown(){

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


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

  _state!.animationVertical= Tween<double>(
    begin: _state!.isInverted?180:0,
    end: _state!.isInverted?360:180,
  ).animate(_state!.animationController);

  _state!.animationController.forward(from: 0.0);

}