factory

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

Declares a factory with a string qualifier in the Koin module. This is a convenience function that wraps the string qualifier in a StringQualifier. Unlike singles, factories create a new instance each time they are requested.

Return

A Koin definition for the factory with the specified string qualifier

Parameters

qualifier

The string value to be used as a qualifier

definition

The definition function that creates new instances

Type Parameters

T

The type of instance to be created by the factory