method open


dynamic open(callback)

Initiates observation and returns the initial value. The callback will be called with the updated value.

Some subtypes may chose to provide additional arguments, such as PathObserver providing the old value as the second argument. However, they must support callbacks with as few as 0 or 1 argument. This can be implemented by performing an "is" type test on the callback.

Source

open(callback);