toggle method
void
toggle()
Flip the card without playing an animation. This cancels any ongoing animation.
Implementation
void toggle() {
controller.stop();
widget.onFlip?.call();
isFront = !isFront;
controller.value = isFront ? 0.0 : 1.0;
setState(() {});
widget.onFlipDone?.call(isFront);
}