IEventListener class

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. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

onEvent(String correlationId, IEvent event, Parameters args) → void
A method called when events this listener is subscrubed to are fired. [...]
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