clearSubscribers function
void
clearSubscribers()
Implementation
void clearSubscribers() {
if (_clearing) return;
_clearing = true;
for (final (_, cleanup) in _listenSubscribers.values) {
cleanup();
}
_listenSubscribers.clear();
for (final (_, cleanup) in _watchSubscribers.values) {
cleanup();
}
_watchSubscribers.clear();
_clearing = false;
}