Join Slack
Powered by
Hi All, I have an abstract class and I need injec...
# dagger
k
Kareem Radwan
03/07/2022, 11:44 AM
Hi All, I have an abstract class and I need inject LruCache instance on each anonymous instance. anyone can help me? I am using Hilt with Kotlin
Kareem Radwan
03/07/2022, 11:44 AM
on this Way I got a error, but when I inject the cache on ViewModel for example it’s work without exceptions
j
Javier
03/07/2022, 12:05 PM
I should avoid not using constructor
Javier
03/07/2022, 12:08 PM
then you can just
@Binds
that
abstract class
with the implementation in the Dagger module
k
Kareem Radwan
03/07/2022, 12:34 PM
ok I will check that
@Binds
3
Views
Open in Slack
Previous
Next