addListener method

void addListener(
  1. FutureOr<void> callback(
    1. String? userId
    )
)

Registers a callback to be executed when the user's status is changed.

Implementation

void addListener(FutureOr<void> Function(String? userId) callback) {
  if (_callbacks.contains(callback)) {
    return;
  }
  _callbacks.add(callback);
}