MultiStateSheet<StateType> constructor
const
MultiStateSheet<StateType> ({
- required MultiStateSheetController<
StateType> scrollController, - ScrollPhysics? physics,
- HitTestBehavior? hitTestBehavior = HitTestBehavior.opaque,
- bool animateOpening = true,
- ShapeBorder? shaper,
- Widget? outside,
- StatefulSheetDelegate<
double> ? topHeaderOffset, - Widget? topHeader,
- Widget? dragger = const DraggerContainer(),
- Widget? header,
- Widget? sliver,
- List<
Widget> ? content, - EdgeInsets? contentPadding,
- Color? safeAreaColor,
- Color? backgroundColor,
- StatefulSheetDelegate<
Color?> ? barrierColorDelegate, - StatefulSheetDelegate<
double> ? outsideOpacityDelegate, - bool drawOutsideWidgetBehindBarrier = false,
- bool offsetOutsideWidgetByTopheader = true,
- bool resizeToAvoidBottomPadding = false,
- bool useSafeArea = true,
- Key? key,
Creates a MultiStateSheet widget, which displays a sheet that supports advanced state management and smooth transitioning between multiple states.
Note:
It is recommended not to use MultiStateSheet inside a SafeArea widget,
as it manages its own padding and will remove any inherited paddings to ensure proper layout.
Instead, you can use the useSafeArea property to control whether the sheet respects safe area insets.
Implementation
const MultiStateSheet({
required this.scrollController,
this.physics,
this.hitTestBehavior = HitTestBehavior.opaque,
this.animateOpening = true,
this.shaper,
this.outside,
this.topHeaderOffset,
this.topHeader,
this.dragger = const DraggerContainer(),
this.header,
this.sliver,
this.content,
this.contentPadding,
this.keepContentBehindFooter = false,
this.footer,
this.footerInsideHeaderLayer = false,
this.safeAreaColor,
this.backgroundColor,
this.barrierColorDelegate,
this.outsideOpacityDelegate,
this.drawOutsideWidgetBehindBarrier = false,
this.offsetOutsideWidgetByTopheader = true,
this.resizeToAvoidBottomPadding = false,
this.useSafeArea = true,
super.key,
});