getListenerCount method

  1. @override
int getListenerCount()
inherited

Returns the number of listeners.

If this method is called during the processing of the execution of the notify listeners operation and listeners were added or removed at that time, then the number of these listeners is not taken into account.

The main purpose of this method is to obtain information about the state of this instance when testing the operation of other objects.

Implementation

@override
int getListenerCount() {
  return _listeners.length;
}