BaseBottomSheet class
基础底部弹窗组件
提供一个可配置的底部弹窗,包含:
- 半透明黑色背景遮罩(点击可关闭)
- 底部弹出的内容容器
- 支持键盘弹出时自动调整底部内边距
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BaseBottomSheet
Constructors
- BaseBottomSheet({Key? key, required Widget child, double minHeight = 0.5, double maxHeight = 0.5, Color? maskColor, bool isDismissible = true, bool enableDrag = true, VoidCallback? onDismiss})
-
const
Properties
- child → Widget
-
弹窗内容组件
final
- enableDrag → bool
-
是否启用拖拽关闭
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDismissible → bool
-
点击背景是否可关闭
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maskColor → Color?
-
背景遮罩颜色,默认黑色透明度为1
final
- maxHeight → double
-
最大高度比例 (0.0-1.0)
final
- minHeight → double
-
最小高度比例 (0.0-1.0)
final
- onDismiss → VoidCallback?
-
弹窗关闭时的回调
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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