buildPhotoCarouselPreview function

Widget buildPhotoCarouselPreview(
  1. PhotoCarouselState state,
  2. AnimationController? borderAnimationController
)

Photo Carousel preview builder Category 3: Complex/Composite - Container is static, navigation buttons are interactive

Implementation

Widget buildPhotoCarouselPreview(
  PhotoCarouselState state,
  AnimationController? borderAnimationController,
) {
  return StateVariantsWrapper(
    componentName: 'Photo Carousel',
    // Rest state shows interactive navigation buttons
    buildRestState: () => _InteractivePhotoCarousel(state: state, borderAnimationController: borderAnimationController),
    // For forced states, we show navigation buttons in specific state
    buildPressedState: () => _buildCarouselWithButtonState(state, borderAnimationController, buttonState: 'pressed'),
    buildHoverState: () => _buildCarouselWithButtonState(state, borderAnimationController, buttonState: 'hover'),
    buildDisabledState: () => _buildDisabledCarousel(state, borderAnimationController),
    buildCyclingState: (stateIndex) => _buildCyclingCarousel(state, borderAnimationController, stateIndex),
    cycleDuration: const Duration(milliseconds: 2000),
  );
}