triggerFlip method
Handles page flipping animation with smart interruption for fast navigation
Implementation
Future<void> triggerFlip(bool swipeLeft) async {
/// Check if we can navigate in the requested direction
if (!canNavigate(swipeLeft)) return;
/// Handle animation interruption if one is currently playing
if (_animationController.isAnimating) {
await _interruptAndSkipToNext(swipeLeft);
return;
}
/// Check if animation is ready (not in fast navigation mode)
if (!appState.isAnimationReady) {
return;
}
/// Start the flip animation
await _performFlipAnimation(swipeLeft);
}