sourceOrNull

inline fun <T : Any> Canvas.sourceOrNull(qualifier: String? = null): T?(source)

Inline extension function to retrieve a dependency using reified type parameters. Returns null if the source is not found.

Return

An instance of the requested type

Parameters

qualifier

An optional name distinguishing bindings of the same type

Type Parameters

T

The type of the dependency to retrieve