morphing_overlay library

Contextual overlay-driven morphing card transitions.

A tapped grid/list item expands from its exact on-screen position into a floating container, then into fullscreen detail — and collapses back to its origin on dismiss.

Quick Start

import 'package:morphing_sheet/morphing_overlay.dart';

// 1. Create controller
final controller = OverlayMorphController(vsync: this);

// 2. Wrap your grid with MorphingOverlay
MorphingOverlay<Product>(
  controller: controller,
  cardBuilder: (context, item, progress) => ProductPreview(item),
  detailBuilder: (context, item, progress) => ProductDetail(item),
  child: GridView.builder(
    itemBuilder: (context, index) {
      // 3. Wrap each item with MorphingSource
      return MorphingSource<Product>(
        controller: controller,
        item: products[index],
        child: ProductTile(products[index]),
      );
    },
  ),
)

Classes

MorphEngine
Unified pure-function interpolation engine for all morph transitions.
MorphGridView<T extends Object>
An internal responsive grid view used by MorphingListBuilder.
MorphingListBuilder<T extends Object>
A high-level builder that integrates MorphingOverlay, OverlayMorphController, MorphingSource, and optionally a grid or carousel preview mode into a single API.
MorphingOverlay<T extends Object>
A contextual overlay morph container with an integrated card carousel.
MorphingSource<T extends Object>
Wraps a widget to act as a morph source for the overlay carousel.
MorphListView<T extends Object>
An internal list view used by MorphingListBuilder.
MorphOverlayManager
Centralized overlay lifecycle manager for card → fullscreen transitions.
MorphPreviewCarousel<T extends Object>
Wraps the preview content of MorphingListBuilder in a carousel if enabled.
MorphState
Immutable snapshot of a morph transition's state.
OverlayGestureLayer
Direction-locking gesture layer for the overlay carousel morph.
OverlayMorphController
Central controller for the overlay carousel morph transition.
OverlayMorphState
Immutable snapshot of the overlay carousel morph state.
RectMorphTween
Pure-function interpolation helpers for rect-based overlay morph.

Enums

MorphPhase
Unified discrete phases for any morph transition.
OverlayPhase
State machine phases for the overlay carousel morph transition.