on method

void on (
  1. dynamic callback
)

Calls callback whenever there is an event

Implementation

void on(/* Callback | ValueCallback */ callback);