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