ScrollPositionWithSingleContextRaiiExt extension

Extension for managing ScrollPositionWithSingleContext lifecycle.

Example:

final scrollPosition = ScrollPositionWithSingleContext(
  physics: AlwaysScrollableScrollPhysics(),
  context: context,
).withLifecycle(this, debugLabel: 'ScrollPosition');
on

Methods

withLifecycle(RaiiLifecycleAware lifecycleAware, {String? debugLabel}) ScrollPositionWithSingleContext

Available on ScrollPositionWithSingleContext, provided by the ScrollPositionWithSingleContextRaiiExt extension

Attaches this scroll position to a RaiiLifecycleAware object.