morphing_card_carousel library

A centered morphing card carousel with horizontal sliding cards, vertical fullscreen morph, circular thumbnail selector strip, and deterministic physics-based animation.

Quick Start

import 'package:morphing_sheet/morphing_card_carousel.dart';

MorphingCardCarousel<Product>(
  items: products,
  cardBuilder: (context, item, progress, index, isActive) {
    return ProductCard(item: item);
  },
  fullscreenBuilder: (context, item, progress) {
    return ProductDetail(item: item);
  },
  thumbnailBuilder: (context, item, isActive) {
    return Image.network(item.thumbUrl, fit: BoxFit.cover);
  },
)

Classes

BackgroundLayer
Background layer with scale, blur, and barrier overlay driven by CardCarouselController.verticalProgress.
CardCarouselController
Central controller for the morphing card carousel.
CardCarouselState
Immutable snapshot of the carousel's complete state.
CardGestureLayer
Gesture disambiguation layer for the morphing card carousel.
CardItem<T>
Generic data wrapper for carousel items.
CardMorphTween
Pure-function interpolation helpers mapping vertical progress (0.0–1.0) to concrete visual property values.
CardStackLayer<T>
Renders the horizontally-swipable card stack.
CarouselScrollPhysics
Custom ScrollPhysics for the horizontal card carousel.
CarouselSnapResolver
Resolves the target index from horizontal swipe velocity and displacement.
MorphEngine
Unified pure-function interpolation engine for all morph transitions.
MorphingCardCarousel<T>
A centered morphing card carousel with:
MorphState
Immutable snapshot of a morph transition's state.
ThumbnailSelectorBar<T>
Horizontal strip of circular thumbnail selectors at the bottom of the screen.

Enums

CardPhase
Discrete state machine phases for the morphing card carousel.
MorphPhase
Unified discrete phases for any morph transition.