I will show my sample code:
interface ErrorDialogInterface {
fun show(title: String)
}
class ErrorDialogImpl @Inject constructor(
private val fragmentManager: FragmentManager
) : ErrorDialogInterface {
override fun show(title: String) {
MyDialog.create().show(fragmentManager, TAG)
}
}
class BaseFragmentWithError: Fragment() {
@Inject lateinit var errorDialogInterface: ErrorDialogInterface
}
I want to inject the errorDialogInterface into the Fragment. However, its implementation contains the dynamic param (which is FragmentManager from Fragment).
Is it possible to do that with Dagger Hilt?
Thanks for supporting guys.