MorphingCard constructor

const MorphingCard({
  1. Key? key,
  2. required Widget collapsedBuilder(
    1. BuildContext context,
    2. double progress
    ),
  3. required Widget expandedBuilder(
    1. BuildContext context,
    2. double progress
    ),
  4. MorphController? controller,
  5. Duration duration = const Duration(milliseconds: 450),
  6. Duration? collapseDuration,
  7. Curve curve = Curves.easeInOutCubic,
  8. bool dragToCollapse = true,
  9. double borderRadius = 16.0,
  10. double maxElevation = 16.0,
  11. Color? surfaceColor,
  12. double scrimOpacity = 0.5,
  13. double backgroundScale = 0.96,
  14. VoidCallback? onExpand,
  15. VoidCallback? onCollapse,
})

Implementation

const MorphingCard({
  super.key,
  required this.collapsedBuilder,
  required this.expandedBuilder,
  this.controller,
  this.duration = const Duration(milliseconds: 450),
  this.collapseDuration,
  this.curve = Curves.easeInOutCubic,
  this.dragToCollapse = true,
  this.borderRadius = 16.0,
  this.maxElevation = 16.0,
  this.surfaceColor,
  this.scrimOpacity = 0.5,
  this.backgroundScale = 0.96,
  this.onExpand,
  this.onCollapse,
});