sourceOr

inline fun <T : Any> Canvas.sourceOr(): 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

Type Parameters

T

The type of the dependency to retrieve