factoryWithRandomQualifier

inline fun <T : Any> ERROR CLASS: Symbol not found for Module.factoryWithRandomQualifier(noinline definition: ERROR CLASS: Symbol not found for Definition<T>): ERROR CLASS: Recursive implicit type(source)

Declares a factory with a random qualifier in the Koin module. This is useful when you need to declare multiple factory definitions of the same type but want them to be uniquely identifiable without manually specifying qualifiers. Unlike singles, factories create a new instance each time they are requested.

Return

A Koin definition for the factory with a random qualifier

Parameters

definition

The definition function that creates new instances

Type Parameters

T

The type of instance to be created by the factory