withDI

inline fun withDI(noinline builder: DI.MainBuilder.() -> Unit, crossinline content: @Composable () -> Unit)

Attaches a DI container to the underlying Composable tree

Parameters

builder

the DI container configuration block

content

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


inline fun withDI(vararg diModules: DI.Module, crossinline content: @Composable () -> Unit)

Creates a DI container and imports DI.Modules before attaching it to the underlying Composable tree

Parameters

diModules

the DI.Modules to import in the newly created DI container

content

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


inline fun withDI(di: DI, crossinline content: @Composable () -> Unit)

Attaches a DI container to the underlying Composable tree

Parameters

di

the DI container to attached to the Composable tree

content

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