MultiStateSheet<StateType> class
A customizable and animated multi snap-state sheet widget.
The MultiStateSheet allows you to create a sheet with support
for snapping behavior, layering of widgets and interactive content.
Key Features:
- Configurable snapping and scrolling behavior.
- Customizable header, footer, and content.
- Animations for opening and transitioning between states.
- Integration with a controller for external state management.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MultiStateSheet
Constructors
-
MultiStateSheet({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.
const
Properties
- animateOpening → bool
-
Defines if the sheet should be animated to the initial state
final
- backgroundColor → Color?
-
Color that will be sheet's content filled with.
final
-
barrierColorDelegate
→ StatefulSheetDelegate<
Color?> ? -
Delegate to calculate the barrier color behind the sheet page.
final
-
content
→ List<
Widget> ? -
List of widgets that represent the main content (body) of the sheet,
and would be displayed inside SliverList.
final
- contentPadding → EdgeInsets?
-
The amount of padding to apply to the content sliver list.
final
- dragger → Widget?
-
An optional widget that serves as the drag handle for the sheet.
final
- drawOutsideWidgetBehindBarrier → bool
-
Defines if outside widget should be drawn behind or on top of the barrier color,
which is described by barrierColorDelegate
final
-
Widget that could be a part of the header or drawn at the end of the sheet, obscuring content.
final
-
Determine if the footer should be placed inside the header layer or the original footer layer.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
Unscrollable widget fixed at the top of the sheet content.
final
- hitTestBehavior → HitTestBehavior?
-
Determines how hit testing is handled for the top header, header, and footer widgets.
final
-
Defines if the content should be kept behind the footer and not cut by it.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- offsetOutsideWidgetByTopheader → bool
-
Defines if outside widget should be layout within the available space outside the sheet and topHeader.
final
- outside → Widget?
-
Widget that is shown at the top of the sheet
and can expand to take all available space outside the sheet.
final
-
outsideOpacityDelegate
→ StatefulSheetDelegate<
double> ? -
Delegate to calculate the opacity of the outside widget based on the current state of the sheet.
final
- physics → ScrollPhysics?
-
How the widgets should respond to user input.
final
- resizeToAvoidBottomPadding → bool
-
If
truethe sheet content should size itself to avoid the onscreen keyboard whose height is defined by the ambient MediaQuery's MediaQueryData.viewInsets property.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeAreaColor → Color?
-
Color that safe area or bottom padding before sheet be filled with.
final
-
scrollController
→ MultiStateSheetController<
StateType> -
Custom ScrollController used to controll state of sheet widget
and get the information of the current state of it.
final
- shaper → ShapeBorder?
-
The shape to be used for the sheet's border.
final
- sliver → Widget?
-
Sliver widget that will be placed before SliverList with a content widgets.
final
- topHeader → Widget?
-
Widget that will be displayed on top of the sheet header.
final
-
topHeaderOffset
→ StatefulSheetDelegate<
double> ? -
Offsets top header relative to the height of the sheet.
final
- useSafeArea → bool
-
Determines whether the widget should respect the safe area insets
(such as notches, status bars, and navigation bars).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< MultiStateSheet< StateType> > -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited