morphing_sheet 0.2.0
morphing_sheet: ^0.2.0 copied to clipboard
A production-ready multi-stage, gesture-driven, spatially continuous UX sheet with physics-based snapping and morphing fullscreen transitions.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.2.0 - 2026-03-03 #
Added #
- List-driven mode via
MorphingSheet.listDriven<T>()— context-aware, item-selection-based sheet with three content layers:DynamicListLayer— lazyListView.builderfor collapsed state (supports 200+ items at 60fps)PreviewLayer— selected item preview at half-expanded stateDetailLayer— fullscreen scrollable detail at expanded state with scroll-to-drag handoff
SheetItem<T>model — lightweight value object wrapping user data for list-driven mode.ItemMorphTween— pure-function interpolation helpers for item-to-sheet morph transitions (morphRect, morphRadius, morphElevation, listOpacity, previewOpacity, detailOpacity).SheetControlleritem selection API:selectItem(Object item)— select item + animate to half-expanded previewclearSelection()— deferred selection clearing (null-out after collapse animation completes)animateToSnap(SnapPoint)— named snap animationanimateToItemDetail(Object item)— select + animate directly to expanded detailselectedItem/hasSelectiongetters
SheetState.selectedItemandSheetState.hasSelectionfor list-driven mode context.SheetScaffold.contentLayerBuilder— custom content composition hook for list-driven mode.- Magnetic snap attraction in
DefaultSheetPhysics(opt-in viaenableMagneticSnap). - Platform-aware physics tuning (iOS/macOS softer rubber-band, Android stiffer).
- Configurable
flickSensitivitymultiplier onDefaultSheetPhysics. SheetPhysics.magneticForce()abstract method with default no-op implementation.- Dual-mode example app with navigation hub for both page-driven and list-driven demos.
- Commerce-style list-driven example (product list, preview, detail, persistent cart bar).
Changed #
SheetScaffoldbarrier tap now callsclearSelection()when in list-driven mode (falls back tocollapse()otherwise).SheetController._onAnimationStatusnow handles deferred selection clearing via_pendingClearSelectionflag.DefaultSheetPhysicsusesflickSensitivitymultiplier in snap resolution.
Migration from 0.1.x #
No breaking changes. All existing MorphingSheet(...) usage works identically.
New features are accessed via MorphingSheet.listDriven<T>(...) and the new SheetController selection API.
0.1.0 - 2026-03-03 #
Added #
- Core
MorphingSheetwidget with multi-stage snap points (collapsed, half-expanded, fully expanded). SheetController(extendsChangeNotifier) for state-management-agnostic integration.- Physics engine with abstract
SheetPhysicsandDefaultSheetPhysicsimplementation. - Velocity-based snap resolution with configurable thresholds.
- Rubber-band resistance at sheet bounds.
- Continuous animation progress (0.0-1.0) driving all visual interpolations.
- Background scale + blur transform driven by sheet progress.
- Horizontal
PageViewswitching (disabled at fully-expanded state). - Custom curve presets (
SheetCurves) optimized for sheet motion. TransitionSpecfor per-element animation intervals.SheetConfigfor full customization of snap points, curves, radii, elevation, and background effects.- Sealed
SheetVisualStatehierarchy for type-safe state matching. - Example app demonstrating all three sheet states with horizontal pages.