I am Editing OLD code and needed to add User login...
# kodein
j
I am Editing OLD code and needed to add User login therefore I have a Bearee Token that needs to go all over BUT I get som (Badly Documented) error on hover
Copy code
bind { factory { authToken: AuthToken -> AddressListViewModelFactory(authToken, instance()) } }
bind { factory { authToken: AuthToken, id: String -> AddressDetailViewModelFactory(authToken, id, instance()) } }
the first Factory works fine BUT when I add another parameter it says Required: DIBinding<*, *, ???> Found: DIProperty<(???) → ???> Type mismatch. Required: DIBinding<*, *, TypeVariable(T)> Found: DIProperty<(???) → ???>
c
I think they removed support for multiple argument factory bindings. The recommendation is to make a new class that combines the former parameters as members and use that as the single factory parameter instead.
j
Maybe HILT!!
r
Indeed, multi argument factories had a limitation of 5 or so arguments , and was blocking us on some other topics.
Using data classes to carry multiple factory arguments are the way to go