ElLinkPopupState<T extends ElLinkPopup> class
abstract
- Inheritance
-
- Object
- State<
T> - ElPopupState<
T> - ElLinkPopupState
- Implementers
Constructors
Properties
- alignment → ElPopupAlignment
-
弹出层对齐位置,如果设置了延迟显示,那么默认弹出层对齐为浮动
no setterinherited
- animationController ↔ AnimationController
-
显示、隐藏弹窗动画控制器
latefinalinherited
- animationDuration → Duration
-
声明默认的动画持续时间
no setterinherited
- bottomMaxHeight → double
-
popup 上下对齐时底部最大高度
no setterinherited
- childAlignBottom → bool
-
目标 child 处于偏下位置
no setterinherited
- childAlignLeft → bool
-
目标 child 处于偏左位置
no setterinherited
- childAlignRight → bool
-
目标 child 处于偏右位置
no setterinherited
- childAlignTop → bool
-
目标 child 处于偏上位置
no setterinherited
-
childKey
→ GlobalKey<
State< StatefulWidget> > -
finalinherited
- childPosition → Offset
-
目标 child 相对 Overlay 的位置
no setterinherited
- childSize → Size
-
目标 child 的大小(当插入 popup 时初始化)
no setterinherited
- context → BuildContext
-
The location in the tree where this widget builds.
no setterinherited
- edgeSpacing → double
-
弹出层与 Overlay 画布之间的间隔
no setterinherited
- groupId → Object
-
点击外部分组 id
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- ignoreOnceListener ↔ bool?
-
忽略一次响应式变量监听方法,有时候更新响应式变量不希望触发监听函数(需要手动控制动画),
你可以将此变量设置为 true,监听拦截后会自动重置它
getter/setter pairinherited
-
indexNotify
→ ValueNotifier<
int> -
no setterinherited
- isCenter → bool
-
是否为居中对齐
no setterinherited
- isFloat → bool
-
是否为浮动对齐
no setterinherited
- isTight → bool
-
弹出层的约束是否为强制最大、最小宽高
no setterinherited
- layerLink → LayerLink
-
finalinherited
- layerOffset → Offset
-
LayerLink 链接的偏移位置
no setterinherited
- leftMaxWidth → double
-
popup 左右对齐时左侧最大宽度
no setterinherited
- localPosition ↔ Offset?
-
指针在目标子组件上的位置,只有当 float 浮动对齐时才会设置此变量
getter/setter pairinherited
- lockObsUpdate ↔ bool
-
锁定响应式变量更新,将此变量设置为 true 后,可以避免任何外部因素意外地修改 obs
getter/setter pairinherited
- modelValue ↔ bool?
-
返回响应式原始数据
getter/setter pairinherited
- mounted → bool
-
Whether this State object is currently in a tree.
no setterinherited
-
obs
↔ Obs<
bool?> -
latefinalinherited
- overlayEntry ↔ ElOverlayEntry?
-
弹出层实例对象
getter/setter pairinherited
-
overlayEntryKey
→ GlobalKey<
State< StatefulWidget> > -
finalinherited
- overlayId → Object
-
弹出层 id 唯一标识符,默认为 hashCode
no setterinherited
- overlaySize → Size
-
当前浮层画布尺寸
no setterinherited
- overlayState → ElOverlayState
-
管理弹出层的 Overlay 对象
no setterinherited
- popupAlignment ↔ ElPopupAlignment?
-
默认对齐方式可能放不下内容,所以在渲染前会进行一次预估,此变量是弹出层最终的对齐位置
getter/setter pairinherited
- popupConstraints → BoxConstraints
-
弹出层默认的尺寸约束,如果用户没有指定约束条件,则
overlaySize将直接作为弹出层默认最大尺寸, 若用户指定了约束条件,则将 widget.constraints 与 overlaySize 进行联合取值。no setter - popupSize → Size
-
弹出层尺寸
no setterinherited
- positionType → _ElPopupPositionType?
-
弹出层的基本类型,如果
alignment为 center 类型,那么该属性为 nullno setterinherited - refreshOverlay ↔ VoidCallback?
-
刷新弹窗内容,此方法会触发 buildOverlay 重建
getter/setter pairinherited
- removeBehavior → ElPopupRemoveBehavior
-
点击弹窗外部应用的移除策略,不同弹窗应用的策略可能并不相同
no setter
- rightMaxWidth → double
-
popup 左右对齐时右侧最大宽度
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safePadding → EdgeInsets
-
适配 SafeArea 安全区域
no setterinherited
- scrollNotify ↔ Listenable
-
感知滚动通知,当发生滚动时可能需要调整弹出层位置
getter/setter pair
- spacing → double
-
弹出层与目标小部件之间的间隔
no setterinherited
- topMaxHeight → double
-
popup 上下对齐时顶部最大高度
no setterinherited
- widget → T
-
The current configuration.
no setterinherited
Methods
-
activate(
) → void -
Called when this object is reinserted into the tree after having been
removed via deactivate.
inherited
-
bindingListener(
) → void -
执行 initState 初始化时绑定响应式监听,通过 modelValue 来驱动弹窗的显示、隐藏
inherited
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
buildFloatEvent(
BuildContext context, Widget child) → Widget - 若是浮动对齐,则需要包裹一层事件小部件来访问指针位置
-
buildOverlay(
BuildContext context) → Widget -
构建 overlay 内容小部件
override
-
buildPopup(
BuildContext context) → Widget - 继承 ElLinkPopup 的子类若要自定义内容,应当重写此方法,而不是 buildOverlay 方法
-
createSimulation(
{required bool forward}) → Simulation? -
使用弹簧动画来驱动 animationController
inherited
-
createTicker(
TickerCallback onTick) → Ticker -
Creates a ticker with the given callback.
inherited
-
deactivate(
) → void -
Called when this object is removed from the tree.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
didChangeDependencies(
) → void -
Called when a dependency of this State object changes.
inherited
-
didUpdateWidget(
covariant T oldWidget) → void -
Called whenever the widget configuration changes.
inherited
-
dispose(
) → void -
Called when this object is removed from the tree permanently.
override
-
forward(
) → TickerFuture -
前进动画
inherited
-
initState(
) → void -
Called when this object is inserted into the tree.
override
-
insertOverlay(
) → void -
插入弹出层
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
) → void -
强制触发响应变更,ValueNotifier 有 2 种情况无法自动响应副作用函数:
inherited
-
obsBuild(
BuildContext context) → Widget -
监听 obs 变量更新,重建 obsBuilder 代码块
inherited
-
obsBuilder(
BuildContext context) → Widget -
构建响应式小部件,当响应式变量发生更新时,会自动重建此方法
inherited
-
onInsert(
) → void -
override
-
onRemove(
) → void -
override
-
reassemble(
) → void -
Called whenever the application is reassembled during debugging, for
example during hot reload.
inherited
-
removeOverlay(
) → void -
移除弹出层
inherited
-
reverse(
) → TickerFuture -
返回动画
inherited
-
reverseCallback(
) → void -
返回动画回调
inherited
-
setState(
VoidCallback fn) → void -
Notify the framework that the internal state of this object has changed.
inherited
-
showOverlay(
) → void -
当 overlayEntry 还存在时,可以调用此方法直接显示弹出层,通常有 2 种情况会调用它:
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
-
toggle(
) → void -
切换显示、隐藏弹窗
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited