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.



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


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


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
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.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.


ADDED → const String
ADDED_TO_STAGE → const String
CANCEL → const String
CHANGE → const String
CLOSE → const String
COMPLETE → const String
CONFIRM → const String
ENTER_FRAME → const String
EXIT_FRAME → const String
MOUSE_LEAVE → const String
OKAY → const String
OPEN → const String
PROGRESS → const String
REMOVED → const String
RENDER → const String
RESIZE → const String
SCROLL → const String
SELECT → const String