MoonBottomSheet class
The Moon Design bottom sheet.
The MoonBottomSheet widget itself is rarely used directly. Instead, prefer to create a modal bottom sheet with showMoonModalBottomSheet.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MoonBottomSheet
Constructors
-
MoonBottomSheet({Key? key, bool enableDrag = true, bool isExpanded = false, BorderRadiusGeometry? borderRadius, Color? backgroundColor, Decoration? decoration, double? closeProgressThreshold, double? height, double minFlingVelocity = _minFlingVelocity, Duration? transitionDuration, Curve? transitionCurve, String? semanticLabel, required void onClosing(), Future<
bool> shouldClose()?, required AnimationController animationController, required ScrollController scrollController, required Widget child}) -
Creates a Moon Design modal bottom sheet.
const
Properties
- animationController → AnimationController
-
Controls the animation for the bottom sheet entrance and exit transitions.
final
- backgroundColor → Color?
-
The background color of the bottom sheet.
final
- borderRadius → BorderRadiusGeometry?
-
The border radius of the bottom sheet.
final
- child → Widget
-
The widget to display inside the bottom sheet as its content.
final
- closeProgressThreshold → double
-
The threshold distance that the bottom sheet must be dragged to before it triggers dismissal.
final
- decoration → Decoration?
-
The custom decoration of the bottom sheet.
final
- enableDrag → bool
-
Whether the bottom sheet can be dragged vertically and dismissed by swiping downwards.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
The fixed height of the bottom sheet or null to adjust to the content height.
final
- isExpanded → bool
-
Whether the bottom sheet is expanded to its full available width or resizes to fit its content.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minFlingVelocity → double
-
The minimum velocity required for the bottom sheet to close when flung.
final
- onClosing → void Function()
-
The callback that is called when the bottom sheet begins the closing process.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController
-
The scroll controller used to navigate the content within the bottom sheet.
final
- semanticLabel → String?
-
The semantic label for the bottom sheet.
final
-
shouldClose
→ (Future<
bool> Function()?) -
The callback that is called to determine whether the bottom sheet should close based on user interaction.
final
- transitionCurve → Curve?
-
The curve of the bottom sheet transition animation (slide in or out).
final
- transitionDuration → Duration?
-
The duration of the bottom sheet transition animation (slide in or out).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → MoonBottomSheetState -
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}) → 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 specifically designed for a MoonBottomSheet.animationController.