StreamEventListener<T> class
Stream Event Listener
A listener is a subscription to a specific event type and data type.
This includes all the information needed for how to react with an event emitter.
This specific listener also includes a Stream to listen to. The callback property is optional, useful to return the callback satisfaction.
- Inheritance
-
- Object
- EventListener<
T> - StreamEventListener
Constructors
-
StreamEventListener(String? type, {EventCallback<
T> ? callback, bool once = false, bool protected = false, EventCallbackAdd<T> ? onAdd, EventCallbackRemove<T> ? onRemove, EventCallbackCall<T> ? onCall, EventCallbackCancel<T> ? onCancel, bool cancelAdded = true})
Properties
-
callback
→ EventCallback<
T> -
finalinherited
- canceled → bool
-
no setterinherited
- dataType → Type
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onAdd
↔ EventCallbackAdd<
T> ? -
getter/setter pairinherited
-
onCall
↔ EventCallbackCall<
T> ? -
getter/setter pairinherited
-
onCancel
↔ EventCallbackCancel<
T> ? -
getter/setter pairinherited
- once → bool
-
finalinherited
-
onRemove
↔ EventCallbackRemove<
T> ? -
getter/setter pairinherited
- protected → bool
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
T> -
no setter
- type → String?
-
finalinherited
Methods
-
appendCallback(
{EventCallbackAdd< T> ? onAdd, EventCallbackRemove<T> ? onRemove, EventCallbackCall<T> ? onCall, EventCallbackCancel<T> ? onCancel}) → void -
inherited
-
call<
T extends Event> (T event) → bool -
Checks if the listener matches the event.
If the event is valid, the callback will be called.
inherited
-
cancel(
) → void -
Cancel the listener.
inherited
-
close(
) → void -
matches<
T> ([String? type, EventCallback< T> ? callback]) → bool -
Checks if the listener matches the event type, data type and callback.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate<
T extends Event> (T event) → bool -
Checks if the listener matches a given event.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited