paint

suspend fun <T : Any> paint(key: CanvasKey<T>): T(source)

Creates a dependency instance during the canvas building phase. Local bindings are resolved first. If this canvas does not contain key, lookup falls back through the parent canvas. Construction is eager, so parent-owned instances are reused and child overrides do not rewire services already created by the parent.

Return

The created dependency instance

Parameters

key

The canvas key identifying the dependency

Type Parameters

T

The type of the dependency


inline suspend fun <T : Any> paint(qualifier: String? = null): T(source)

Creates a dependency instance using reified type parameters.

Return

The created dependency instance

Parameters

qualifier

Optional qualifier to distinguish between multiple instances

Type Parameters

T

The type of the dependency