onNotify static method

void onNotify(
  1. String key,
  2. Function f
)

Implementation

static void onNotify(String key, Function f) {
  if (subs[key] == null) subs[key] = [];
  subs[key].add(f);
}