registerLifecycleCallback method
void
registerLifecycleCallback(
- ServiceManagerLifecycle lifecycle,
- ServiceManagerCallback<
T> callback
Registers a callback that will be called at a particular phase in the
lifecycle of opening or closing a VmService connection.
Implementation
void registerLifecycleCallback(
ServiceManagerLifecycle lifecycle,
ServiceManagerCallback<T> callback,
) {
_lifecycleCallbacks
.putIfAbsent(
lifecycle,
() => <ServiceManagerCallback<T>>[],
)
.add(callback);
}