detachListener method

void detachListener()

Removes instance of latest ThreatCallback. Also cancels StreamSubscription for that ThreatCallback.

If no callback was attached earlier, it has no effect.

Implementation

void detachListener() {
  _streamSubscription?.cancel();
  _streamSubscription = null;
}