removeUpdate method
Removes a widget’s subscription for a specific key and uniqueKey.
This is typically called in dispose() to prevent memory leaks.
Implementation
void removeUpdate(Key key, UniqueKey uniqueKey) {
_updates[key]?.removeWhere((notifier) => notifier.key == uniqueKey);
if (_updates[key]?.isEmpty ?? false) {
_updates.remove(key);
}
}