addObserverWithLifeycle method
void
addObserverWithLifeycle(
- RaiiLifecycleAware lifecycleAware,
- WidgetsBindingObserver observer, {
- String? debugLabel,
Adds a listener that will be automatically removed
when the lifecycleAware
is disposed.
Implementation
void addObserverWithLifeycle(
RaiiLifecycleAware lifecycleAware,
WidgetsBindingObserver observer, {
String? debugLabel,
}) {
RaiiWidgetsBindingObserver.withLifecycle(
lifecycleAware,
this,
observer,
debugLabel: debugLabel,
);
}