EventDetector class
A widget for detecting dom events on a widget or part of tree.
Event detector can be used to register event listeners in capturing as well as in bubbling phase.
Constructors
- EventDetector({Key? key, EventCallback? onClick, EventCallback? onDoubleClick, EventCallback? onInput, EventCallback? onChange, EventCallback? onSubmit, EventCallback? onKeyUp, EventCallback? onKeyDown, EventCallback? onKeyPress, EventCallback? onDrag, EventCallback? onDragEnd, EventCallback? onDragEnter, EventCallback? onDragLeave, EventCallback? onDragOver, EventCallback? onDragStart, EventCallback? onDrop, EventCallback? onMouseDown, EventCallback? onMouseEnter, EventCallback? onMouseLeave, EventCallback? onMouseMove, EventCallback? onMouseOver, EventCallback? onMouseOut, EventCallback? onMouseUp, EventCallback? onClickCapture, EventCallback? onDoubleClickCapture, EventCallback? onInputCapture, EventCallback? onChangeCapture, EventCallback? onSubmitCapture, EventCallback? onKeyUpCapture, EventCallback? onKeyDownCapture, EventCallback? onKeyPressCapture, EventCallback? onDragCapture, EventCallback? onDragEndCapture, EventCallback? onDragEnterCapture, EventCallback? onDragLeaveCapture, EventCallback? onDragOverCapture, EventCallback? onDragStartCapture, EventCallback? onDropCapture, EventCallback? onMouseDownCapture, EventCallback? onMouseEnterCapture, EventCallback? onMouseLeaveCapture, EventCallback? onMouseMoveCapture, EventCallback? onMouseOverCapture, EventCallback? onMouseOutCapture, EventCallback? onMouseUpCapture, required Widget child})
-
const
Properties
- child → Widget
-
Child widget.
finalinherited
- correspondingTag → DomTagType?
-
Corresponding HTML tag to use to render this widget
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Keys help Rad identify which widgets have changed, are added, or are
removed when a widget has multiple sibling widgets.
finalinherited
- onChange → EventCallback?
-
On change event listener.
final
- onChangeCapture → EventCallback?
-
On change event listener in capture phase.
final
- onClick → EventCallback?
-
On click event listener.
final
- onClickCapture → EventCallback?
-
On click event listener in capture phase.
final
- onDoubleClick → EventCallback?
-
On double click event listener.
final
- onDoubleClickCapture → EventCallback?
-
On double click event listener in capture phase.
final
- onDrag → EventCallback?
-
On Drag event listener.
final
- onDragCapture → EventCallback?
-
On Drag event listener in capture phase.
final
- onDragEnd → EventCallback?
-
On DragEnd event listener.
final
- onDragEndCapture → EventCallback?
-
On DragEnd event listener in capture phase.
final
- onDragEnter → EventCallback?
-
On DragEnter event listener.
final
- onDragEnterCapture → EventCallback?
-
On DragEnter event listener in capture phase.
final
- onDragLeave → EventCallback?
-
On DragLeave event listener.
final
- onDragLeaveCapture → EventCallback?
-
On DragLeave event listener in capture phase.
final
- onDragOver → EventCallback?
-
On DragOver event listener.
final
- onDragOverCapture → EventCallback?
-
On DragOver event listener in capture phase.
final
- onDragStart → EventCallback?
-
On DragStart event listener.
final
- onDragStartCapture → EventCallback?
-
On DragStart event listener in capture phase.
final
- onDrop → EventCallback?
-
On Drop event listener.
final
- onDropCapture → EventCallback?
-
On Drop event listener in capture phase.
final
- onInput → EventCallback?
-
On input event listener.
final
- onInputCapture → EventCallback?
-
On input event listener in capture phase.
final
- onKeyDown → EventCallback?
-
On key down event listener.
final
- onKeyDownCapture → EventCallback?
-
On key down event listener in capture phase.
final
- onKeyPress → EventCallback?
-
On key press event listener.
final
- onKeyPressCapture → EventCallback?
-
On key press event listener in capture phase.
final
- onKeyUp → EventCallback?
-
On key up event listener.
final
- onKeyUpCapture → EventCallback?
-
On key up event listener in capture phase.
final
- onMouseDown → EventCallback?
-
On mouse down event listener.
final
- onMouseDownCapture → EventCallback?
-
On mouse down event listener in capture phase.
final
- onMouseEnter → EventCallback?
-
On mouse enter event listener.
final
- onMouseEnterCapture → EventCallback?
-
On mouse enter event listener in capture phase.
final
- onMouseLeave → EventCallback?
-
On mouse leave event listener.
final
- onMouseLeaveCapture → EventCallback?
-
On mouse leave event listener in capture phase.
final
- onMouseMove → EventCallback?
-
On mouse move event listener.
final
- onMouseMoveCapture → EventCallback?
-
On mouse move event listener in capture phase.
final
- onMouseOut → EventCallback?
-
On mouse out event listener.
final
- onMouseOutCapture → EventCallback?
-
On mouse out event listener in capture phase.
final
- onMouseOver → EventCallback?
-
On mouse over event listener.
final
- onMouseOverCapture → EventCallback?
-
On mouse over event listener in capture phase.
final
- onMouseUp → EventCallback?
-
On mouse up event listener.
final
- onMouseUpCapture → EventCallback?
-
On mouse up event listener in capture phase.
final
- onSubmit → EventCallback?
-
On submit event listener.
final
- onSubmitCapture → EventCallback?
-
On submit event listener in capture phase.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
widgetCaptureEventListeners
→ Map<
DomEventType, EventCallback?> -
Events that this widget is listening to in capturing phase.
no setteroverride
-
widgetEventListeners
→ Map<
DomEventType, EventCallback?> -
Events that this widget is listening to in bubbling phase.
no setteroverride
Methods
-
createRenderElement(
RenderElement parent) → RenderElement -
Create element for current widget.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldUpdateWidget(
Widget oldWidget) → bool -
Whether to update current widget.
override
-
shouldUpdateWidgetChildren(
Widget oldWidget, bool shouldUpdateWidget) → bool -
Whether to update current widget's children.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited