subDI

inline fun subDI(parentDI: DI, allowSilentOverride: Boolean = false, copy: Copy = Copy.NonCached, noinline diBuilder: DI.MainBuilder.() -> Unit, crossinline content: @Composable () -> Unit)

Allows to create an extended version of a given DI container and attaches it to the underlying Composable tree

Parameters

parentDI

the DI container that will be copied and extended

allowSilentOverride

Whether the configuration block is allowed to non-explicit overrides.

copy

The copy specifications, that defines which bindings will be copied to the new container. All bindings from the extended container will be accessible in the new container, but only the copied bindings are able to access overridden bindings in this new container. By default, all bindings that do not hold references (e.g. not singleton or multiton) are copied.

diBuilder

DI container configuration block

content

underlying Composable tree that will be able to consume the DI container


inline fun subDI(allowSilentOverride: Boolean = false, copy: Copy = Copy.NonCached, noinline diBuilder: DI.MainBuilder.() -> Unit, crossinline content: @Composable () -> Unit)

Allows to create an extended version of the LocalDI container and attaches it to the underlying Composable tree

Parameters

allowSilentOverride

Whether the configuration block is allowed to non-explicit overrides.

copy

The copy specifications, that defines which bindings will be copied to the new container. All bindings from the extended container will be accessible in the new container, but only the copied bindings are able to access overridden bindings in this new container. By default, all bindings that do not hold references (e.g. not singleton or multiton) are copied.

diBuilder

DI container configuration block

content

underlying Composable tree that will be able to consume the DI container