removeListener method

bool removeListener(
  1. StreamxxListener_c? item
)

Implementation

bool removeListener(StreamxxListener_c? item) {
  if (null == item) {
    return false;
  }
  for (int i = 0; i < _listeners.length; ++i) {
    final nowId = _listeners[i].id;
    if (nowId == item.id) {
      _listeners.removeAt(i);
      return true;
    } else if (nowId > item.id) {
      return false;
    }
  }
  return false;
}