ElLinkPopup class abstract
使用 LayerLink 链接 child 与 popup 的位置,在目标小部件周围显示弹出层
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ElModelValue<
bool?> - ElPopup
- ElLinkPopup
- Implementers
- Available extensions
Constructors
-
ElLinkPopup({Key? key, dynamic show, Duration? duration, Object? overlayId, ElOverlayState? overlayState, bool rootOverlay = true, bool keepAlive = false, bool preventBack = false, ValueChanged<
bool?> ? onChanged, VoidCallback? onInsert, VoidCallback? onRemove, required Widget transitionBuilder(BuildContext context, Widget child), required Widget overlayBuilder(BuildContext context), Widget builder(BuildContext context, ElPopupState<ElPopup> state) = _builder, required Widget child, Object? groupId, ElPopupAlignment? alignment, ElPopupRemoveBehavior? removeBehavior, ElPopupAdjustPosition adjustPosition = ElPopupAdjustPosition.boundary, bool? coverTarget, double? spacing, double? edgeSpacing, BoxConstraints? constraints}) -
const
Properties
- adjustPosition → ElPopupAdjustPosition
-
弹出层如何触发重新定位,默认 ElPopupAdjustPosition.boundary,
当目标方向放不下弹窗内容时,才会调整方向
final
- alignment → ElPopupAlignment?
-
弹出层的对齐位置,如果设置了
hoverDelayShow延迟显示, 那么默认对齐为 ElPopupAlignment.float,否则默认为 ElPopupAlignment.bottomfinal -
builder
→ Widget Function(BuildContext context, ElPopupState<
ElPopup> state) -
构建代理子组件
finalinherited
- child → Widget
-
链接的目标子组件,弹窗会在该小部件周围显示
final
- constraints → BoxConstraints?
-
设置弹出层尺寸范围,如果最大最小宽高相等,则弹窗布局性能将会提高一倍
final
- coverTarget → bool?
-
弹窗是否覆盖目标组件
final
- duration → Duration?
-
弹出层的过渡时间,默认 El.duration
finalinherited
- edgeSpacing → double?
-
弹出层与 Overlay 画布之间的间隔
final
- groupId → Object?
-
点击外部分组 id,默认以当前 State 的 hashCode 作为分组 id
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- keepAlive → bool
-
关闭弹出层时是否保留状态
finalinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- modelType → ElModelValueType
-
双向绑定类型
finalinherited
- modelValue → dynamic
-
支持基础数据类型和响应式变量,如果变量类型为 ValueNotifier,
则无需监听 onChanged 方法手动更新 UI。以
ElSwitch组件为例:finalinherited -
onChanged
→ ValueChanged<
bool?> ? -
变量更新通知方法
finalinherited
- onInsert → VoidCallback?
-
插入弹出层回调
finalinherited
- onRemove → VoidCallback?
-
移除弹出层回调
finalinherited
- overlayBuilder → Widget Function(BuildContext context)
-
构建弹出层小部件
finalinherited
- overlayId → Object?
-
指定弹出层的 id 标识,默认为当前 State 的 hashCode,如果弹出层的 State 生命周期不稳定,
你应当指定弹出层的 id 标识,这样可以避免一些意外的 bug。
finalinherited
- overlayState → ElOverlayState?
-
将弹出层直接挂载到指定的 ElOverlay 实例上
finalinherited
- preventBack → bool
-
是否拦截物理返回(仅限安卓)
finalinherited
- removeBehavior → ElPopupRemoveBehavior?
-
点击弹窗外部所应用的移除策略,默认为 ElPopupRemoveBehavior.tapDown,但有些弹窗可能是其他策略
final
- rootOverlay → bool
-
将弹出层挂载到顶级 ElOverlay 实例上
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- show → dynamic
-
手动控制弹出层的显示隐藏(支持双向绑定)
finalinherited
- spacing → double?
-
弹出层与目标小部件之间的间隔
final
- transitionBuilder → Widget Function(BuildContext context, Widget child)
-
构建弹出层动画
finalinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ElPopup> -
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