on method

void on(
  1. String stream,
  2. void callback(
    1. Object
    )?
)

Subscribes to the given stream stream. If stream already has data set, it will be delivered to the callback function.

Implementation

void on(String stream, void Function(Object)? callback) {
  _mStorage?.setCallback(stream, callback);
}