hasListeners property

bool get hasListeners

Whether this ProviderElementBase is currently listened to or not.

This maps to listeners added with listen. See also mayNeedDispose, called when hasListeners may have changed.

Implementation

bool get hasListeners =>
    (_dependents?.isNotEmpty ?? false) || _providerDependents.isNotEmpty;