GlobalEventHandlers abstract#
Implemented types
Implementers
Properties#
hashCode no setter inherited#
The hash code for this object.
A hash code is a single integer which represents the state of the object that affects operator == comparisons.
All objects have hash codes. The default hash code implemented by Object represents only the identity of the object, the same way as the default operator == implementation only considers objects equal if they are identical (see identityHashCode).
If operator == is overridden to use the object state instead, the hash code must also be changed to represent that state, otherwise the object cannot be used in hash based data structures like the default Set and Map implementations.
Hash codes must be the same for objects that are equal to each other according to operator ==. The hash code of an object should only change if the object changes in a way that affects equality. There are no further requirements for the hash codes. They need not be consistent between executions of the same program and there are no distribution guarantees.
Objects that are not equal are allowed to have the same hash code. It is even technically allowed that all instances have the same hash code, but if clashes happen too often, it may reduce the efficiency of hash-based data structures like HashSet or HashMap.
If a subclass overrides hashCode, it should override the operator == operator as well to maintain consistency.
Inherited from Object.
Implementation
external int get hashCode;
on no setter override#
This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.
Implementation
Events get on;
onAbort no setter#
Implementation
Stream<Event> get onAbort => abortEvent.forTarget(this);
onBlur no setter#
Implementation
Stream<Event> get onBlur => blurEvent.forTarget(this);
onCanPlay no setter#
Implementation
Stream<Event> get onCanPlay => canPlayEvent.forTarget(this);
onCanPlayThrough no setter#
Implementation
Stream<Event> get onCanPlayThrough => canPlayThroughEvent.forTarget(this);
onChange no setter#
Implementation
Stream<Event> get onChange => changeEvent.forTarget(this);
onClick no setter#
Implementation
Stream<MouseEvent> get onClick => clickEvent.forTarget(this);
onContextMenu no setter#
Implementation
Stream<MouseEvent> get onContextMenu => contextMenuEvent.forTarget(this);
onDoubleClick no setter#
Implementation
@DomName('GlobalEventHandlers.ondblclick')
Stream<Event> get onDoubleClick => doubleClickEvent.forTarget(this);
onDrag no setter#
Implementation
Stream<MouseEvent> get onDrag => dragEvent.forTarget(this);
onDragEnd no setter#
Implementation
Stream<MouseEvent> get onDragEnd => dragEndEvent.forTarget(this);
onDragEnter no setter#
Implementation
Stream<MouseEvent> get onDragEnter => dragEnterEvent.forTarget(this);
onDragLeave no setter#
Implementation
Stream<MouseEvent> get onDragLeave => dragLeaveEvent.forTarget(this);
onDragOver no setter#
Implementation
Stream<MouseEvent> get onDragOver => dragOverEvent.forTarget(this);
onDragStart no setter#
Implementation
Stream<MouseEvent> get onDragStart => dragStartEvent.forTarget(this);
onDrop no setter#
Implementation
Stream<MouseEvent> get onDrop => dropEvent.forTarget(this);
onDurationChange no setter#
Implementation
Stream<Event> get onDurationChange => durationChangeEvent.forTarget(this);
onEmptied no setter#
Implementation
Stream<Event> get onEmptied => emptiedEvent.forTarget(this);
onEnded no setter#
Implementation
Stream<Event> get onEnded => endedEvent.forTarget(this);
onError no setter#
Implementation
Stream<Event> get onError => errorEvent.forTarget(this);
onFocus no setter#
Implementation
Stream<Event> get onFocus => focusEvent.forTarget(this);
onInput no setter#
Implementation
Stream<Event> get onInput => inputEvent.forTarget(this);
onInvalid no setter#
Implementation
Stream<Event> get onInvalid => invalidEvent.forTarget(this);
onKeyDown no setter#
Implementation
Stream<KeyboardEvent> get onKeyDown => keyDownEvent.forTarget(this);
onKeyPress no setter#
Implementation
Stream<KeyboardEvent> get onKeyPress => keyPressEvent.forTarget(this);
onKeyUp no setter#
Implementation
Stream<KeyboardEvent> get onKeyUp => keyUpEvent.forTarget(this);
onLoad no setter#
Implementation
Stream<Event> get onLoad => loadEvent.forTarget(this);
onLoadedData no setter#
Implementation
Stream<Event> get onLoadedData => loadedDataEvent.forTarget(this);
onLoadedMetadata no setter#
Implementation
Stream<Event> get onLoadedMetadata => loadedMetadataEvent.forTarget(this);
onMouseDown no setter#
Implementation
Stream<MouseEvent> get onMouseDown => mouseDownEvent.forTarget(this);
onMouseEnter no setter#
Implementation
Stream<MouseEvent> get onMouseEnter => mouseEnterEvent.forTarget(this);
onMouseLeave no setter#
Implementation
Stream<MouseEvent> get onMouseLeave => mouseLeaveEvent.forTarget(this);
onMouseMove no setter#
Implementation
Stream<MouseEvent> get onMouseMove => mouseMoveEvent.forTarget(this);
onMouseOut no setter#
Implementation
Stream<MouseEvent> get onMouseOut => mouseOutEvent.forTarget(this);
onMouseOver no setter#
Implementation
Stream<MouseEvent> get onMouseOver => mouseOverEvent.forTarget(this);
onMouseUp no setter#
Implementation
Stream<MouseEvent> get onMouseUp => mouseUpEvent.forTarget(this);
onMouseWheel no setter#
Implementation
Stream<WheelEvent> get onMouseWheel => mouseWheelEvent.forTarget(this);
onPause no setter#
Implementation
Stream<Event> get onPause => pauseEvent.forTarget(this);
onPlay no setter#
Implementation
Stream<Event> get onPlay => playEvent.forTarget(this);
onPlaying no setter#
Implementation
Stream<Event> get onPlaying => playingEvent.forTarget(this);
onRateChange no setter#
Implementation
Stream<Event> get onRateChange => rateChangeEvent.forTarget(this);
onReset no setter#
Implementation
Stream<Event> get onReset => resetEvent.forTarget(this);
onResize no setter#
Implementation
Stream<Event> get onResize => resizeEvent.forTarget(this);
onScroll no setter#
Implementation
Stream<Event> get onScroll => scrollEvent.forTarget(this);
onSeeked no setter#
Implementation
Stream<Event> get onSeeked => seekedEvent.forTarget(this);
onSeeking no setter#
Implementation
Stream<Event> get onSeeking => seekingEvent.forTarget(this);
onSelect no setter#
Implementation
Stream<Event> get onSelect => selectEvent.forTarget(this);
onStalled no setter#
Implementation
Stream<Event> get onStalled => stalledEvent.forTarget(this);
onSubmit no setter#
Implementation
Stream<Event> get onSubmit => submitEvent.forTarget(this);
onSuspend no setter#
Implementation
Stream<Event> get onSuspend => suspendEvent.forTarget(this);
onTimeUpdate no setter#
Implementation
Stream<Event> get onTimeUpdate => timeUpdateEvent.forTarget(this);
onTouchCancel no setter#
Implementation
Stream<TouchEvent> get onTouchCancel => touchCancelEvent.forTarget(this);
onTouchEnd no setter#
Implementation
Stream<TouchEvent> get onTouchEnd => touchEndEvent.forTarget(this);
onTouchMove no setter#
Implementation
Stream<TouchEvent> get onTouchMove => touchMoveEvent.forTarget(this);
onTouchStart no setter#
Implementation
Stream<TouchEvent> get onTouchStart => touchStartEvent.forTarget(this);
onVolumeChange no setter#
Implementation
Stream<Event> get onVolumeChange => volumeChangeEvent.forTarget(this);
onWaiting no setter#
Implementation
Stream<Event> get onWaiting => waitingEvent.forTarget(this);
onWheel no setter#
Implementation
Stream<WheelEvent> get onWheel => wheelEvent.forTarget(this);
runtimeType no setter inherited#
A representation of the runtime type of the object.
Inherited from Object.
Implementation
external Type get runtimeType;
Methods#
addEventListener() override#
Implementation
void addEventListener(
String type,
dynamic listener(Event event)?, [
bool? useCapture,
]);
dispatchEvent() override#
Implementation
bool dispatchEvent(Event event);
noSuchMethod() inherited#
Invoked when a nonexistent method or property is accessed.
A dynamic member invocation can attempt to call a member which doesn't exist on the receiving object. Example:
dynamic object = 1;
object.add(42); // Statically allowed, run-time error
This invalid code will invoke the noSuchMethod method
of the integer 1 with an Invocation
representing the
.add(42) call and arguments (which then throws).
Classes can override noSuchMethod to provide custom behavior for such invalid dynamic invocations.
A class with a non-default noSuchMethod invocation can also omit implementations for members of its interface. Example:
class MockList<T> implements List<T> {
noSuchMethod(Invocation invocation) {
log(invocation);
super.noSuchMethod(invocation); // Will throw.
}
}
void main() {
MockList().add(42);
}
This code has no compile-time warnings or errors even though
the MockList class has no concrete implementation of
any of the List interface methods.
Calls to List methods are forwarded to noSuchMethod,
so this code will log an invocation similar to
Invocation.method(#add, [42])
and then throw.
If a value is returned from noSuchMethod,
it becomes the result of the original invocation.
If the value is not of a type that can be returned by the original
invocation, a type error occurs at the invocation.
The default behavior is to throw a NoSuchMethodError.
Inherited from Object.
Implementation
@pragma("vm:entry-point")
@pragma("wasm:entry-point")
external dynamic noSuchMethod(Invocation invocation);
removeEventListener() override#
Implementation
void removeEventListener(
String type,
dynamic listener(Event event)?, [
bool? useCapture,
]);
toString() inherited#
A string representation of this object.
Some classes have a default textual representation,
often paired with a static parse function (like int.parse).
These classes will provide the textual representation as
their string representation.
Other classes have no meaningful textual representation
that a program will care about.
Such classes will typically override toString to provide
useful information when inspecting the object,
mainly for debugging or logging.
Inherited from Object.
Implementation
external String toString();
Operators#
operator ==() inherited#
The equality operator.
The default behavior for all Objects is to return true if and
only if this object and other are the same object.
Override this method to specify a different equality relation on a class. The overriding method must still be an equivalence relation. That is, it must be:
Total: It must return a boolean for all arguments. It should never throw.
Reflexive: For all objects
o,o == omust be true.-
Symmetric: For all objects
o1ando2,o1 == o2ando2 == o1must either both be true, or both be false. -
Transitive: For all objects
o1,o2, ando3, ifo1 == o2ando2 == o3are true, theno1 == o3must be true.
The method should also be consistent over time, so whether two objects are equal should only change if at least one of the objects was modified.
If a subclass overrides the equality operator, it should override the hashCode method as well to maintain consistency.
Inherited from Object.
Implementation
external bool operator ==(Object other);
Constants#
abortEvent#
Implementation
static const EventStreamProvider<Event> abortEvent =
const EventStreamProvider<Event>('abort');
blurEvent#
Implementation
static const EventStreamProvider<Event> blurEvent =
const EventStreamProvider<Event>('blur');
canPlayEvent#
Implementation
static const EventStreamProvider<Event> canPlayEvent =
const EventStreamProvider<Event>('canplay');
canPlayThroughEvent#
Implementation
static const EventStreamProvider<Event> canPlayThroughEvent =
const EventStreamProvider<Event>('canplaythrough');
changeEvent#
Implementation
static const EventStreamProvider<Event> changeEvent =
const EventStreamProvider<Event>('change');
clickEvent#
Implementation
static const EventStreamProvider<MouseEvent> clickEvent =
const EventStreamProvider<MouseEvent>('click');
contextMenuEvent#
Implementation
static const EventStreamProvider<MouseEvent> contextMenuEvent =
const EventStreamProvider<MouseEvent>('contextmenu');
doubleClickEvent#
Implementation
@DomName('GlobalEventHandlers.dblclickEvent')
static const EventStreamProvider<Event> doubleClickEvent =
const EventStreamProvider<Event>('dblclick');
dragEndEvent#
Implementation
static const EventStreamProvider<MouseEvent> dragEndEvent =
const EventStreamProvider<MouseEvent>('dragend');
dragEnterEvent#
Implementation
static const EventStreamProvider<MouseEvent> dragEnterEvent =
const EventStreamProvider<MouseEvent>('dragenter');
dragEvent#
Implementation
static const EventStreamProvider<MouseEvent> dragEvent =
const EventStreamProvider<MouseEvent>('drag');
dragLeaveEvent#
Implementation
static const EventStreamProvider<MouseEvent> dragLeaveEvent =
const EventStreamProvider<MouseEvent>('dragleave');
dragOverEvent#
Implementation
static const EventStreamProvider<MouseEvent> dragOverEvent =
const EventStreamProvider<MouseEvent>('dragover');
dragStartEvent#
Implementation
static const EventStreamProvider<MouseEvent> dragStartEvent =
const EventStreamProvider<MouseEvent>('dragstart');
dropEvent#
Implementation
static const EventStreamProvider<MouseEvent> dropEvent =
const EventStreamProvider<MouseEvent>('drop');
durationChangeEvent#
Implementation
static const EventStreamProvider<Event> durationChangeEvent =
const EventStreamProvider<Event>('durationchange');
emptiedEvent#
Implementation
static const EventStreamProvider<Event> emptiedEvent =
const EventStreamProvider<Event>('emptied');
endedEvent#
Implementation
static const EventStreamProvider<Event> endedEvent =
const EventStreamProvider<Event>('ended');
errorEvent#
Implementation
static const EventStreamProvider<Event> errorEvent =
const EventStreamProvider<Event>('error');
focusEvent#
Implementation
static const EventStreamProvider<Event> focusEvent =
const EventStreamProvider<Event>('focus');
inputEvent#
Implementation
static const EventStreamProvider<Event> inputEvent =
const EventStreamProvider<Event>('input');
invalidEvent#
Implementation
static const EventStreamProvider<Event> invalidEvent =
const EventStreamProvider<Event>('invalid');
keyDownEvent#
Implementation
static const EventStreamProvider<KeyboardEvent> keyDownEvent =
const EventStreamProvider<KeyboardEvent>('keydown');
keyPressEvent#
Implementation
static const EventStreamProvider<KeyboardEvent> keyPressEvent =
const EventStreamProvider<KeyboardEvent>('keypress');
keyUpEvent#
Implementation
static const EventStreamProvider<KeyboardEvent> keyUpEvent =
const EventStreamProvider<KeyboardEvent>('keyup');
loadedDataEvent#
Implementation
static const EventStreamProvider<Event> loadedDataEvent =
const EventStreamProvider<Event>('loadeddata');
loadedMetadataEvent#
Implementation
static const EventStreamProvider<Event> loadedMetadataEvent =
const EventStreamProvider<Event>('loadedmetadata');
loadEvent#
Implementation
static const EventStreamProvider<Event> loadEvent =
const EventStreamProvider<Event>('load');
mouseDownEvent#
Implementation
static const EventStreamProvider<MouseEvent> mouseDownEvent =
const EventStreamProvider<MouseEvent>('mousedown');
mouseEnterEvent#
Implementation
static const EventStreamProvider<MouseEvent> mouseEnterEvent =
const EventStreamProvider<MouseEvent>('mouseenter');
mouseLeaveEvent#
Implementation
static const EventStreamProvider<MouseEvent> mouseLeaveEvent =
const EventStreamProvider<MouseEvent>('mouseleave');
mouseMoveEvent#
Implementation
static const EventStreamProvider<MouseEvent> mouseMoveEvent =
const EventStreamProvider<MouseEvent>('mousemove');
mouseOutEvent#
Implementation
static const EventStreamProvider<MouseEvent> mouseOutEvent =
const EventStreamProvider<MouseEvent>('mouseout');
mouseOverEvent#
Implementation
static const EventStreamProvider<MouseEvent> mouseOverEvent =
const EventStreamProvider<MouseEvent>('mouseover');
mouseUpEvent#
Implementation
static const EventStreamProvider<MouseEvent> mouseUpEvent =
const EventStreamProvider<MouseEvent>('mouseup');
mouseWheelEvent#
Implementation
static const EventStreamProvider<WheelEvent> mouseWheelEvent =
const EventStreamProvider<WheelEvent>('mousewheel');
pauseEvent#
Implementation
static const EventStreamProvider<Event> pauseEvent =
const EventStreamProvider<Event>('pause');
playEvent#
Implementation
static const EventStreamProvider<Event> playEvent =
const EventStreamProvider<Event>('play');
playingEvent#
Implementation
static const EventStreamProvider<Event> playingEvent =
const EventStreamProvider<Event>('playing');
rateChangeEvent#
Implementation
static const EventStreamProvider<Event> rateChangeEvent =
const EventStreamProvider<Event>('ratechange');
resetEvent#
Implementation
static const EventStreamProvider<Event> resetEvent =
const EventStreamProvider<Event>('reset');
resizeEvent#
Implementation
static const EventStreamProvider<Event> resizeEvent =
const EventStreamProvider<Event>('resize');
scrollEvent#
Implementation
static const EventStreamProvider<Event> scrollEvent =
const EventStreamProvider<Event>('scroll');
seekedEvent#
Implementation
static const EventStreamProvider<Event> seekedEvent =
const EventStreamProvider<Event>('seeked');
seekingEvent#
Implementation
static const EventStreamProvider<Event> seekingEvent =
const EventStreamProvider<Event>('seeking');
selectEvent#
Implementation
static const EventStreamProvider<Event> selectEvent =
const EventStreamProvider<Event>('select');
stalledEvent#
Implementation
static const EventStreamProvider<Event> stalledEvent =
const EventStreamProvider<Event>('stalled');
submitEvent#
Implementation
static const EventStreamProvider<Event> submitEvent =
const EventStreamProvider<Event>('submit');
suspendEvent#
Implementation
static const EventStreamProvider<Event> suspendEvent =
const EventStreamProvider<Event>('suspend');
timeUpdateEvent#
Implementation
static const EventStreamProvider<Event> timeUpdateEvent =
const EventStreamProvider<Event>('timeupdate');
touchCancelEvent#
Implementation
static const EventStreamProvider<TouchEvent> touchCancelEvent =
const EventStreamProvider<TouchEvent>('touchcancel');
touchEndEvent#
Implementation
static const EventStreamProvider<TouchEvent> touchEndEvent =
const EventStreamProvider<TouchEvent>('touchend');
touchMoveEvent#
Implementation
static const EventStreamProvider<TouchEvent> touchMoveEvent =
const EventStreamProvider<TouchEvent>('touchmove');
touchStartEvent#
Implementation
static const EventStreamProvider<TouchEvent> touchStartEvent =
const EventStreamProvider<TouchEvent>('touchstart');
volumeChangeEvent#
Implementation
static const EventStreamProvider<Event> volumeChangeEvent =
const EventStreamProvider<Event>('volumechange');
waitingEvent#
Implementation
static const EventStreamProvider<Event> waitingEvent =
const EventStreamProvider<Event>('waiting');
wheelEvent#
Implementation
static const EventStreamProvider<WheelEvent> wheelEvent =
const EventStreamProvider<WheelEvent>('wheel');