removeListener method

void removeListener(
  1. ClientListener listener
)

Removes a listener from the LightstreamerClient instance so that it will not receive events anymore.

Lifecycle a listener can be removed at any time.

Implementation

void removeListener(ClientListener listener) {
  var found = _listeners.remove(listener);
  if (found) {
    scheduleMicrotask(() {
      listener.onListenEnd();
    });
  }
}