removeListener method

  1. @override
void removeListener (
  1. ImageStreamListener listener
)
override

Stops the specified listener from receiving image stream events.

If listener has been added multiple times, this removes the first instance of the listener.

Implementation

@override
void removeListener(ImageStreamListener listener) {
  super.removeListener(listener);
  if (!hasListeners) {
    _timer?.cancel();
    _timer = null;
  }
}