ElDrag class
基于 ElListener 实现的监听拖拽事件小部件,它不参与 GestureArenaManager 手势竞技场
- Inheritance
- Implementers
- Available extensions
Constructors
- ElDrag({Key? key, HitTestBehavior? behavior, PointerDownEventListener? onPointerDown, VoidCallback? onCancel, ElGestureDragStartCallback? onDragStart, GestureDragUpdateCallback? onDragUpdate, GestureDragEndCallback? onDragEnd, bool? enabledAnimate, Widget? child})
-
const
Properties
- behavior → HitTestBehavior
-
命中测试行为,默认:HitTestBehavior.deferToChild,事件命中的三个行为有以下特征:
finalinherited
- builder → TransitionBuilder?
-
finalinherited
- child → Widget?
-
finalinherited
- disabled → bool
-
是否禁用事件,此属性相当于嵌套一个 IgnorePointer 小部件,它会忽略自身以及后代所有指针事件
finalinherited
- enabledAnimate → bool?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onCancel → VoidCallback?
-
通用的指针取消事件
finalinherited
- onDragEnd → GestureDragEndCallback?
-
拖拽结束事件
final
- onDragStart → ElGestureDragStartCallback?
-
拖拽开始事件,指针第一次移动时立即执行,接收一个 bool 参数作为返回值,
如果返回 true,那么当前指针将作为唯一胜利者,忽略所有其他指针,
若没有返回 true,那么当前指针会放弃竞争,并且不会执行 onDragUpdate、onDragEnd 回调。
final
- onDragUpdate → GestureDragUpdateCallback?
-
拖拽更新事件
final
- onHover → PointerHoverEventListener?
-
原始指针悬停事件
finalinherited
- onPointerDown → PointerDownEventListener?
-
原始指针按下事件
finalinherited
- onPointerMove → PointerMoveEventListener?
-
原始指针移动事件
finalinherited
- onPointerPanZoomEnd → PointerPanZoomEndEventListener?
-
finalinherited
- onPointerPanZoomStart → PointerPanZoomStartEventListener?
-
这三个事件用于监听平移、缩放
finalinherited
- onPointerPanZoomUpdate → PointerPanZoomUpdateEventListener?
-
finalinherited
- onPointerSignal → PointerSignalEventListener?
-
鼠标滚轮事件
finalinherited
- onPointerUp → PointerUpEventListener?
-
原始指针抬起事件
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → RenderObjectElement -
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
-
createRenderObject(
BuildContext context) → RenderObject -
Creates an instance of the RenderObject class that this
RenderObjectWidget represents, using the configuration described by this
RenderObjectWidget.
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
-
didUnmountRenderObject(
covariant RenderObject renderObject) → void -
This method is called when a RenderObject that was previously
associated with this widget is removed from the render tree.
The provided RenderObject will be of the same type as the one created by
this widget's createRenderObject method.
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
-
updateRenderObject(
BuildContext context, covariant RenderObject renderObject) → void -
Copies the configuration described by this RenderObjectWidget to the
given RenderObject, which will be of the same type as returned by this
object's createRenderObject.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited