on abstract method

void on(
  1. dynamic callback(
    1. RelayEvent
    )
)

Sets a callback function to be called when events occur on the relay. The callback function should take a single argument of type RelayEvent.

Implementation

void on(Function(RelayEvent) callback);