The playground is part of the Flutter web demo. Adjust any option, tap the preview card to try it, and copy the generated ExpandableAnimation code.

What you can change

  • Expansion mode: fullscreen, dialog or sheet.
  • Motion: duration and curve, or spring stiffness and damping ratio.
  • Shape and background: border radius, background blur and opacity.
  • Gestures: drag-to-dismiss on or off, dismiss threshold, velocity threshold, minimum scale and haptic feedback.

Example output:

ExpandableAnimation(
  mode: const ExpandableAnimationMode.dialog(),
  physics: const ExpandableAnimationPhysics.spring(
    stiffness: 200,
    dampingRatio: 0.80,
  ),
  borderRadius: BorderRadius.circular(24),
  expandedBorderRadius: BorderRadius.circular(28),
  backgroundBlur: 8,
  expandedBuilder: (context) => const DetailsPage(),
  child: const PreviewCard(),
)

Every option is described in the documentation.