IEventListener class abstract

An interface for listener objects that receive notifications on fired events.

See IEvent See Event

Example

class MyListener implements IEventListener {
     void _onEvent(String correlationId, IEvent event, Parameters args ) {
        print('Fired event ' + event.getName());
    }
}

var event =  Event('myevent');
event.addListener( MyListener());
event.notify('123', Parameters.fromTuples(['param1', 'ABC']));

// Console output: Fired event myevent

Constructors

IEventListener()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onEvent(String? correlationId, IEvent event, Parameters args) → void
A method called when events this listener is subscrubed to are fired.
toString() String
A string representation of this object.
inherited

Operators

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