ModalBottomSheet class
A custom bottom sheet.
The ModalBottomSheet widget itself is rarely used directly. Instead, prefer to create a modal bottom sheet with showMaterialModalBottomSheet.
See also:
- showMaterialModalBottomSheet which can be used to display a modal bottom sheet with Material appareance.
- showCupertinoModalBottomSheet which can be used to display a modal bottom sheet with Cupertino appareance.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ModalBottomSheet
Constructors
-
ModalBottomSheet({Key? key, required AnimationController animationController, Curve? animationCurve, bool enableDrag = true, WidgetWithChildBuilder? containerBuilder, bool bounce = true, Future<
bool> shouldClose()?, required ScrollController scrollController, required bool expanded, required dynamic onClosing(), required Widget child, double minFlingVelocity = _minFlingVelocity, double? closeProgressThreshold, double willPopThreshold = _willPopThreshold}) -
Creates a bottom sheet.
const
Properties
- animationController → AnimationController
-
The animation controller that controls the bottom sheet's entrance and
exit animations.
final
- animationCurve → Curve?
-
The curve used by the animation showing and dismissing the bottom sheet.
final
- bounce → bool
-
Allows the bottom sheet to go beyond the top bound of the content,
but then bounce the content back to the edge of
the top bound.
final
- child → Widget
-
A builder for the contents of the sheet.
final
- closeProgressThreshold → double
-
The closeProgressThreshold parameter
specifies when the bottom sheet will be dismissed when user drags it.
final
- containerBuilder → WidgetWithChildBuilder?
-
final
- enableDrag → bool
-
If true, the bottom sheet can be dragged up and down and dismissed by
swiping downwards.
final
- expanded → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minFlingVelocity → double
-
The minFlingVelocity parameter
Determines how fast the sheet should be flinged before closing.
final
- onClosing → dynamic Function()
-
Called when the bottom sheet begins to close.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController
-
final
-
shouldClose
→ Future<
bool> Function()? -
final
- willPopThreshold → double
-
The willPopThreshold parameter
Determines how far the sheet should be flinged before closing.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → ModalBottomSheetState -
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
Static Methods
-
createAnimationController(
TickerProvider vsync, {Duration? duration}) → AnimationController - Creates an AnimationController suitable for a ModalBottomSheet.animationController.