Open source · MIT · Flutter
Expand any widget. Animate every transition.
Flutter package for widget-to-fullscreen transitions, expandable card animations and container morphing with spring physics and drag-to-dismiss.
flutter pub add expandable_animation
Not an accordion. This package does not expand a list
item in place like ExpansionTile. It turns a widget into a larger view (fullscreen, dialog or
sheet) with a morphing, interruptible transition. What
"expandable" means here.



Expandable Animation (expandable_animation) is a Flutter package for
smooth widget-to-fullscreen transitions, expandable card animations and
interactive container morphing. Wrap any widget, return the expanded view from a
builder, and the package morphs its position, size, corner radius and color into a fullscreen page,
a centered dialog or a bottom sheet — then back again.
ExpandableAnimation(
borderRadius: BorderRadius.circular(20),
expandedBuilder: (context) => const ProductDetails(),
child: const ProductCard(),
)
What you get
Container transform
Position, size, border radius and surface color interpolate together for one continuous motion.
Drag to dismiss
Pull the expanded view down to shrink it and send it home, with velocity and distance thresholds.
Spring motion
Use duration and curve, or spring physics with optional overshoot and presets.
Fullscreen, dialog or sheet
Expand to the whole screen, a centered panel, a partial-height sheet or custom bounds.
Back button and Escape
The expanded view is a real route: back, Escape, PopScope and focus behave as expected.
Flutter SDK only
No third-party runtime dependencies, no platform channels besides optional haptics.
Examples
Each guide explains the problem, shows the code and links to a runnable demo.
Card to fullscreen animation
Morph a product card into a detail page.
Expandable music player
Mini player to full player with shared playback state.
Fullscreen image transition
Open gallery thumbnails into an image viewer.
Drag-to-dismiss animation
Interactive dismissal that cooperates with scrolling.
Container transform animation
How the morph works and how to tune it.
OpenContainer alternative
A fair comparison with Hero and OpenContainer.