withLifecycle method
Attaches this change notifier to a RaiiLifecycleAware object for automatic disposal.
The change notifier will be disposed when the lifecycle is disposed.
Implementation
T withLifecycle(RaiiLifecycleAware lifecycleAware, {String? debugLabel}) {
RaiiDisposeable.withLifecycle(
lifecycleAware,
dispose: dispose,
debugLabel: debugLabel,
);
return this;
}