flipRight method
void
flipRight()
Flips the Flipper to the Right for one time. Only works with DragAxis.horizontal and DragAxis.both.
Implementation
void flipRight(){
assert(_state != null,
'Controller not attached to any Flipper. Seems that you forget to attach controller to Flipper.');
assert((dragAxis!=DragAxis.vertical),
'Cannot call flipRight() 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?360:180,
end: _state!.isFront?180:0,
).animate(_state!.animationController);
if(_state!.isInverted) {
_state!.animationController.reverse(from: 1.0);
}else{
_state!.animationController.forward(from: 0.0);
}
}