Lets say i have a Singleton Class which is injected using dagger
@Singleton
class SingletonClass {
@Inject
lateinit var newInstanceEveryTime: NewInstanceEveryTime
fun getNewInstance(): NewInstanceEveryTime {
return newInstanceEveryTime
}
}
whenever i call the method getNewInstance()
using SingletonClass.getNewInstance(), i need to get the new instance every time, but i know that it will not create the instance every time, Can anyone help me how can i achieve this from singleton class using dagger.