ExpandableAnimatedCard constructor
const
ExpandableAnimatedCard({
- Key? key,
- required WidgetBuilder collapsedBuilder,
- required WidgetBuilder expandedBuilder,
- Duration animationDuration = const Duration(milliseconds: 500),
- Curve animationCurve = Curves.easeInOutCubic,
- Interval fadeInterval = const Interval(0.35, 1.0, curve: Cubic(0.5, 0.0, 0.3, 1.0)),
- EdgeInsetsGeometry expandedMargin = const EdgeInsets.fromLTRB(16, 16, 16, 16),
- EdgeInsetsGeometry expandedPadding = const EdgeInsets.all(0),
- double? maxWidth,
- bool useSafeArea = true,
- Color? backgroundColor = const Color(0xFF5D5D5D),
- Gradient? backgroundGradient,
- Color? borderColor,
- double borderWidth = 1.0,
- BorderRadiusGeometry? borderRadius = const BorderRadius.all(Radius.circular(20)),
- double elevation = 4.0,
- Color? shadowColor,
- HeaderMode headerMode = HeaderMode.overlay,
- double headerHeight = 40.0,
- Color overlayBackgroundColor = Colors.black54,
- double blurSigma = 0.0,
- Widget scrimBuilder()?,
- Widget headerBuilder()?,
- Color barrierColor = Colors.transparent,
- bool barrierDismissible = true,
- bool enableDragToDismiss = false,
- double dragDismissThreshold = 120.0,
- VoidCallback? onClose,
- VoidCallback? onOpened,
- VoidCallback? onClosed,
- ValueChanged<
bool> ? onStateChanged, - RouteSettings? routeSettings,
- String? barrierLabel,
- Clip clipBehavior = Clip.antiAlias,
- ExpandableAnimatedCardController? controller,
- bool autoOpenOnTap = true,
Default constructor — allows full customization.
Implementation
const ExpandableAnimatedCard({
super.key,
required this.collapsedBuilder,
required this.expandedBuilder,
this.animationDuration = const Duration(milliseconds: 500),
this.animationCurve = Curves.easeInOutCubic,
this.fadeInterval = const Interval(
0.35,
1.0,
curve: Cubic(0.5, 0.0, 0.3, 1.0),
),
this.expandedMargin = const EdgeInsets.fromLTRB(16, 16, 16, 16),
this.expandedPadding = const EdgeInsets.all(0),
this.maxWidth,
this.useSafeArea = true,
this.backgroundColor = const Color(0xFF5D5D5D),
this.backgroundGradient,
this.borderColor,
this.borderWidth = 1.0,
this.borderRadius = const BorderRadius.all(Radius.circular(20)),
this.elevation = 4.0,
this.shadowColor,
this.headerMode = HeaderMode.overlay,
this.headerHeight = 40.0,
this.overlayBackgroundColor = Colors.black54,
this.blurSigma = 0.0,
this.scrimBuilder,
this.headerBuilder,
this.barrierColor = Colors.transparent,
this.barrierDismissible = true,
this.enableDragToDismiss = false,
this.dragDismissThreshold = 120.0,
this.onClose,
this.onOpened,
this.onClosed,
this.onStateChanged,
this.useRootNavigator = false,
this.routeSettings,
this.barrierLabel,
this.clipBehavior = Clip.antiAlias,
this.controller,
this.autoOpenOnTap = true,
}) : _type = CardType.normal,
menuOffset = 0.0,
menuAlignment = Alignment.topCenter,
_sheetMaxHeight = null,
_sheetMaxHeightFraction = null,
_sheetDragDismissThresholdFraction = null;