Event class

Holds basic information about an event.

For many events, such as the events represented by the Event class constants, this basic information is sufficient. Other events, however, may require more detailed information. Events associated with a mouse click, for example, need to include additional information about the location of the click event and whether any keys were pressed during the click event. You can pass such additional information to event listeners by extending the Event class, which is what the MouseEvent class does.

The methods of the Event class can be used in event listener functions to affect the behavior of the event object. You can make the current event listener the last one to process an event by calling the stopPropagation or stopImmediatePropagation method.

Implementers

Constructors

Event(String type, [ bool bubbles = false ])
Creates an Event of specified type.

Properties

bubbles → bool
Indicates whether an event is a bubbling event. If the event can bubble, this value is true; otherwise it is false. [...]
read-only
captures → bool
Indicates whether an event is a capturing event.
read-only
currentTarget EventDispatcher
The object that is actively processing the Event object with an event listener. [...]
read-only
eventPhase EventPhase
The current phase in the event flow. [...]
read-only
isImmediatePropagationStopped → bool
Indicates if the propagation of this event has been stopped. [...]
read-only
isPropagationStopped → bool
Indicates if the propagation of this event has been stopped. [...]
read-only
target EventDispatcher
The event target. [...]
read-only
type → String
The type of event.
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

stopImmediatePropagation() → void
Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow. [...]
stopPropagation() → void
Prevents processing of any event listeners in nodes subsequent to the current node in the event flow. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Constants

ADDED → const String
'added'
ADDED_TO_STAGE → const String
'addedToStage'
CANCEL → const String
'cancel'
CHANGE → const String
'change'
CLOSE → const String
'close'
COMPLETE → const String
'complete'
CONFIRM → const String
'confirm'
ENTER_FRAME → const String
'enterFrame'
EXIT_FRAME → const String
'exitFrame'
MOUSE_LEAVE → const String
'mouseLeave'
OKAY → const String
'okay'
OPEN → const String
'open'
PROGRESS → const String
'progress'
REMOVED → const String
'removed'
REMOVED_FROM_STAGE → const String
'removedFromStage'
RENDER → const String
'render'
RESIZE → const String
'resize'
SCROLL → const String
'scroll'
SELECT → const String
'select'