didRegisterListener method Null safety
protected">@protected
Calls didStartListening every time a registration of a listener causes an empty list of listeners to become non-empty.
See also:
- didUnregisterListener, which may cause the listener list to become empty again, and in turn cause this method to call didStartListening again.
Implementation
@protected
void didRegisterListener() {
assert(_listenerCounter >= 0);
if (_listenerCounter == 0) {
didStartListening();
}
_listenerCounter += 1;
}