addListenerWithLifecycle method
void
addListenerWithLifecycle(
- RaiiLifecycleAware lifecycleAware,
- VoidCallback onListen, {
- String? debugLabel,
Adds a listener that will be automatically removed
when the lifecycleAware
is disposed.
Implementation
void addListenerWithLifecycle(
RaiiLifecycleAware lifecycleAware,
VoidCallback onListen, {
String? debugLabel,
}) {
RaiiListenableListener.withLifecycle(
lifecycleAware,
listenable: this,
onListen: onListen,
debugLabel: debugLabel,
);
}