ExpandableAnimatedCard constructor

const ExpandableAnimatedCard({
  1. Key? key,
  2. required WidgetBuilder collapsedBuilder,
  3. required WidgetBuilder expandedBuilder,
  4. Duration animationDuration = const Duration(milliseconds: 500),
  5. Curve animationCurve = Curves.easeInOutCubic,
  6. Interval fadeInterval = const Interval(0.35, 1.0, curve: Cubic(0.5, 0.0, 0.3, 1.0)),
  7. EdgeInsetsGeometry expandedMargin = const EdgeInsets.fromLTRB(16, 16, 16, 16),
  8. EdgeInsetsGeometry expandedPadding = const EdgeInsets.all(0),
  9. double? maxWidth,
  10. bool useSafeArea = true,
  11. Color? backgroundColor = const Color(0xFF5D5D5D),
  12. Gradient? backgroundGradient,
  13. Color? borderColor,
  14. double borderWidth = 1.0,
  15. BorderRadiusGeometry? borderRadius = const BorderRadius.all(Radius.circular(20)),
  16. double elevation = 4.0,
  17. Color? shadowColor,
  18. HeaderMode headerMode = HeaderMode.overlay,
  19. double headerHeight = 40.0,
  20. Color overlayBackgroundColor = Colors.black54,
  21. double blurSigma = 0.0,
  22. Widget scrimBuilder(
    1. BuildContext,
    2. Animation<double>
    )?,
  23. Widget headerBuilder(
    1. BuildContext,
    2. VoidCallback
    )?,
  24. Color barrierColor = Colors.transparent,
  25. bool barrierDismissible = true,
  26. bool enableDragToDismiss = false,
  27. double dragDismissThreshold = 120.0,
  28. VoidCallback? onClose,
  29. VoidCallback? onOpened,
  30. VoidCallback? onClosed,
  31. ValueChanged<bool>? onStateChanged,
  32. bool useRootNavigator = false,
  33. RouteSettings? routeSettings,
  34. String? barrierLabel,
  35. Clip clipBehavior = Clip.antiAlias,
  36. ExpandableAnimatedCardController? controller,
  37. 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;