on method

void on(
  1. String event,
  2. Function callback
)

Bind a channel to an event.

Implementation

void on(String event, Function callback) =>
    subscription.bind(event, callback);