activityRetainedScope
fun ComponentActivity.activityRetainedScope(pathBuilder: ActivityRetainedScopePathBuilder.() -> Path = { find of Root }): Lazy<AndroidScopes.ActivityRetainedScope>
Lazily creates or retrieves an AndroidScopes.ActivityRetainedScope tied to this ComponentActivity. This scope survives activity recreation due to configuration changes (e.g., screen rotation). It is managed by a hidden SavedHandleViewModel and is closed only when the activity is finished for good.
Return
A Lazy delegate that provides the AndroidScopes.ActivityRetainedScope.
Parameters
pathBuilder
A DSL block to define the path to the parent scope. Defaults to the root scope.
inline fun <T : Activity> ComponentActivity.activityRetainedScope(noinline pathBuilder: ActivityRetainedScopePathBuilder.() -> Path = { find of Root }): Lazy<AndroidScopes.ActivityRetainedScope>
A type-safe overload of activityRetainedScope for inline usage.