withLifecycle method

RestorableNumN<T> withLifecycle(
  1. RaiiLifecycleAware lifecycleAware, {
  2. String? debugLabel,
})

Attaches this nullable restorable number to a RaiiLifecycleAware object for automatic disposal.

Implementation

RestorableNumN<T> withLifecycle(
  RaiiLifecycleAware lifecycleAware, {
  String? debugLabel,
}) {
  RaiiDisposeable.withLifecycle(
    lifecycleAware,
    dispose: dispose,
    debugLabel: debugLabel,
  );
  return this;
}