on method

void on(
  1. String key,
  2. Function val
)

Alias for addListener

Implementation

void on(String key, Function val) {
  addListener(key, val);
}