lazyInstance

inline fun <R> Graph.lazyInstance(noinline block: ComponentBuilderBlock? = null): Lazy<R>(source)

Creates an instance of Lazy that resolves the service for R on first access.

Return

The provider function.

Parameters

block

An optional builder block to pass runtime dependencies to the factory.

Throws


fun <R> Graph.lazyInstance(key: TypeKey<R>, block: ComponentBuilderBlock? = null): Lazy<R>(source)

Creates an instance of Lazy that resolves the service for key on first access.

Return

The provider function.

Parameters

key

The TypeKey of the service to resolve.

block

An optional builder block to pass runtime dependencies to the factory.

Throws