listen method

Subscription listen(
  1. Function callback
)

Listen on value changed then run callback, it also run callback in first time

Function callback can has parameters

  • none
  • one: the current value
  • two: the current, old value

Implementation

Subscription listen(Function callback) {
  _executeCallback(callback);
  return changed(callback);
}