expandable_animation library
Widget-to-fullscreen and card expansion animations for Flutter, with container morphing, spring physics and interactive drag-to-dismiss.
Wrap any widget in an ExpandableAnimation and provide an
expandedBuilder:
import 'package:expandable_animation/expandable_animation.dart';
ExpandableAnimation(
borderRadius: BorderRadius.circular(20),
expandedBuilder: (context) => const ProductDetails(),
child: const ProductCard(),
)
Use an ExpandableAnimationController to expand and collapse from code, an ExpandableAnimationMode to choose where the view expands to, and ExpandableAnimationPhysics for spring-driven motion.
Classes
- ExpandableAnimation
- Expands any widget into a fullscreen or expanded view with a smooth, interruptible container-morphing animation.
- ExpandableAnimationController
-
Controls an
ExpandableAnimationprogrammatically and reports its state. - ExpandableAnimationGestureConfig
- Configures interactive drag-to-dismiss on an expanded view.
- ExpandableAnimationMode
-
Describes where an
ExpandableAnimationexpands to. - ExpandableAnimationPhysics
-
Spring physics for an
ExpandableAnimationtransition. - ExpandableAnimationSlot
-
Marks an element that morphs on its own path during an
ExpandableAnimationtransition — a shared element transition inside the container transform. - ExpandableAnimationTheme
-
Provides ExpandableAnimationThemeData defaults to every
ExpandableAnimationbelow it. - ExpandableAnimationThemeData
-
Default values for every
ExpandableAnimationbelow an ExpandableAnimationTheme. - ExpandableAnimationZoomable
- Pinch-to-zoom, pan and double-tap zoom that cooperate with drag-to-dismiss.
- ExpandedBoundsContext
- Layout information passed to an ExpandableAnimationMode when it resolves the bounds of the expanded view.
- SpringCurve
- A Curve that follows a spring moving from 0 to 1 starting at rest.
Enums
- ExpandableAnimationDismissDirection
- A direction in which the user can drag an expanded view to dismiss it.
- ExpandableAnimationPhase
-
The lifecycle phase of an
ExpandableAnimation.
Typedefs
-
ExpandableAnimationTransitionBuilder
= Widget Function(BuildContext context, Animation<
double> animation, Widget collapsed, Widget expanded) -
Signature for a function that composes the collapsed and expanded layers
of an
ExpandableAnimationinside the morphing surface. - ExpandedBoundsResolver = Rect Function(ExpandedBoundsContext context)
- Signature for a function that computes custom expanded bounds.