Closed benlancaster closed 5 years ago
Similarly, there are also for factories with multiple arguments.
bind() from factory { id: Long, entity: String -> DetailViewModelFactory(id, entity, instance()) }
direct retrieval to fetch a dependency
private var viewModelFactory: ( (Long, String) -> DetailViewModelFactory) by factory(???) // There is something wrong here that I can not figure out how to properly recover the instance from the factory.
Documentation updated.
See #215 for multi-arg factory retrieval.
the factoryX functions are not mentioned in the doc.
It will be available with the next release.
Following on from stackoverflow, there is very scarce documentation on multi-argument factories.
Here's the example I used in the stackoverflow question: