withLifecycle method

RestorableIntN withLifecycle(
  1. RaiiLifecycleAware lifecycleAware, {
  2. String? debugLabel,
})

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

Implementation

RestorableIntN withLifecycle(
  RaiiLifecycleAware lifecycleAware, {
  String? debugLabel,
}) {
  RaiiDisposeable.withLifecycle(
    lifecycleAware,
    dispose: dispose,
    debugLabel: debugLabel,
  );
  return this;
}