ElOverlay class
构建浮层区域,其功能与 Overlay 一样,都是用于在页面上渲染多个独立的弹出层元素, 之所以不使用 Overlay 是因为实现保持弹窗状态比较困难,而 ElOverlay 只需要修改 index 即可调整窗口绘制权重。
在 ElApp.builder 中会构建一个默认浮层,不过它只适合展示轻量级内容,因为默认弹窗层级比 Navigator 要高,
所以浮层会永远显示在路由页面之上,当展示 Dialog、Drawer 等弹窗组件,建议在局部插入 ElOverlay 小部件,
这样才不会遮挡新跳转的路由页面。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ElOverlay
- Available extensions
Properties
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ElOverlay> -
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
-
noScrollbarBehavior(
BuildContext context, {Key? key, bool? overscroll, bool enabled = true}) → Widget -
Available on Widget, provided by the FlutterWidgetExt extension
不使用祖先提供的默认滚动条,当使用自定义滚动条时请添加此扩展方法,防止与祖先提供的默认滚动条重叠 -
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 Properties
-
rootOverlayKey
→ GlobalKey<
ElOverlayState> -
顶级浮层 Key
final
- state → ElOverlayState
-
顶级 ElOverlayState 对象
no setter
Static Methods
-
of(
BuildContext context, {bool rootOverlay = false}) → ElOverlayState - 从当前上下文访问 ElOverlayState 实例