SlidingSheet constructor
SlidingSheet({
- Key? key,
- SheetBuilder? builder,
- CustomSheetBuilder? customBuilder,
- SheetBuilder? headerBuilder,
- SnapSpec snapSpec = const SnapSpec(),
- Duration duration = const Duration(milliseconds: 1000),
- SlidingSheetStateController? slidingSheetStateController,
- Color? color,
- Color? backdropColor,
- Color? shadowColor = Colors.black54,
- double elevation = 0.0,
- EdgeInsets? padding,
- bool avoidStatusBar = false,
- EdgeInsets? margin,
- EdgeInsets? marginWhenExpanded,
- Border? border,
- double cornerRadius = 0.0,
- double? cornerRadiusWhenExpanded = 0.0,
- bool closeOnBackdropTap = false,
- SheetListener? listener,
- SheetController? controller,
- ScrollSpec scrollSpec = const ScrollSpec(overscroll: false),
- double maxWidth = double.infinity,
- double? minHeight,
- bool closeSheetOnBackButtonPressed = false,
- bool isBackdropInteractable = false,
- Widget? body,
- ParallaxSpec? parallaxSpec,
- double axisAlignment = 0.0,
- bool extendBody = false,
- double liftOnScrollHeaderElevation = 0.0,
- bool isDismissable = true,
- OnDismissPreventedCallback? onDismissPrevented,
- SystemUiOverlayStyle? systemUiOverlayStyle,
- SystemUiOverlayStyle? systemUiOverlayStyleWhenExpanded,
Creates a sheet than can be dragged and scrolled in a single gesture to be placed inside you widget tree.
Implementation
SlidingSheet({
Key? key,
this.builder,
this.customBuilder,
this.headerBuilder,
this.footerBuilder,
this.snapSpec = const SnapSpec(),
this.duration = const Duration(milliseconds: 1000),
this.slidingSheetStateController,
this.color,
this.backdropColor,
this.shadowColor = Colors.black54,
this.elevation = 0.0,
this.padding,
this.avoidStatusBar = false,
this.margin,
this.marginWhenExpanded,
this.border,
this.cornerRadius = 0.0,
this.cornerRadiusWhenExpanded = 0.0,
this.closeOnBackdropTap = false,
this.listener,
this.controller,
this.scrollSpec = const ScrollSpec(overscroll: false),
this.maxWidth = double.infinity,
this.minHeight,
this.closeSheetOnBackButtonPressed = false,
this.isBackdropInteractable = false,
this.body,
this.parallaxSpec,
this.axisAlignment = 0.0,
this.extendBody = false,
this.liftOnScrollHeaderElevation = 0.0,
this.liftOnScrollFooterElevation = 0.0,
this.isDismissable = true,
this.onDismissPrevented,
this.systemUiOverlayStyle,
this.systemUiOverlayStyleWhenExpanded,
}) : assert(builder != null || customBuilder != null),
assert(builder == null || customBuilder == null),
assert(snapSpec.snappings.isNotEmpty,
'There must be at least one extent to snap in between.'),
assert(snapSpec.minSnap <= snapSpec.maxSnap,
'The min and max snaps cannot be equal.'),
assert(axisAlignment >= -1.0 && axisAlignment <= 1.0),
assert(liftOnScrollHeaderElevation >= 0.0),
assert(liftOnScrollFooterElevation >= 0.0),
super(key: key);