ExpressiveBottomSheet class
Compose's BottomSheet: a sheet on anchors over the space it is given
(see the library doc). Give it the whole screen: it stands at the
bottom, centred, at most 640dp wide.
It starts at initialValue (hidden by default, as Compose's state does; ExpressiveSheetController.show raises it). child is laid out in the space under the drag handle and above the bottom inset; a vertical scrollable in it that uses the primary scroll controller hands its drag to the sheet as Compose's nested scroll does. The sheet pads its own insets (the top one only as it reaches the status bar) and removes them from child's media query.
Compose has no action sheet: its list items in this sheet are one, so the
bottom sheet stands for the action-sheet role (the sheet role's
primary is ExpressiveSheetPage).
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ExpressiveBottomSheet
Constructors
-
ExpressiveBottomSheet({required Widget child, ExpressiveSheetController? controller, ExpressiveSheetValue initialValue = ExpressiveSheetValue.hidden, bool skipPartiallyExpanded = false, bool gesturesEnabled = true, Widget? dragHandle = const ExpressiveSheetDragHandle(), VoidCallback? onDismissRequest, bool confirmHide()?, ValueListenable<
double> ? predictiveBackProgress, ExpressiveComponentThemeData? style, Key? key}) -
A bottom sheet showing
child.const
Properties
- child → Widget
-
The sheet's content.
final
- confirmHide → bool Function()?
-
Asked before the user's hand (a drag or fling, the handle) hides the
sheet (Compose's
confirmValueChangeforHidden); false keeps it up, and a released sheet springs back to its anchor. Null allows it.final - controller → ExpressiveSheetController?
-
Drives the sheet; one is made when null.
final
- dragHandle → Widget?
-
The drag handle over the content (Compose's
dragHandleslot,BottomSheetDefaults.DragHandleby default); null draws none. The sheet makes it tappable and gives it the sheet's accessibility actions.final - gesturesEnabled → bool
-
Whether a drag moves the sheet.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → ExpressiveSheetValue
-
Where the sheet stands at its first layout. A partial anchor the sheet
does not have falls to the expanded one.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onDismissRequest → VoidCallback?
-
Told when the sheet has settled out of sight by the user's hand (a
fling down, the handle): its owner removes it.
final
-
predictiveBackProgress
→ ValueListenable<
double> ? -
A predictive back gesture's eased progress (0 to 1), which scales the
sheet; null when nothing drives one.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skipPartiallyExpanded → bool
-
Whether the sheet has no partial anchor.
final
- style → ExpressiveComponentThemeData?
-
Stateful visual overrides before the bottom-sheet theme.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ExpressiveBottomSheet> -
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.
override
-
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
Constants
- containerKey → const Key
- The sheet's container.