MorphingCard constructor
const
MorphingCard({
- Key? key,
- required Widget collapsedBuilder(
- BuildContext context,
- double progress
- required Widget expandedBuilder(
- BuildContext context,
- double progress
- MorphController? controller,
- Duration duration = const Duration(milliseconds: 450),
- Duration? collapseDuration,
- Curve curve = Curves.easeInOutCubic,
- bool dragToCollapse = true,
- double borderRadius = 16.0,
- double maxElevation = 16.0,
- Color? surfaceColor,
- double scrimOpacity = 0.5,
- double backgroundScale = 0.96,
- VoidCallback? onExpand,
- 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,
});