I have this helper class that I want to use directly in my @Composables
class Helper @Inject private constructor(private val tagger: Tagger) {
fun formatName(tagType: TagType, name: String) {
// do stuff here
}
}
The formatting is purely for presentation purposes so I am hoping to use it in composable direclty as below
@Composable
fun Profile(){
Text(text=Helper.formatName('name'))
}
main issue is that I have to use Tagger as it is. Doing val tagger = Tagger() is failing because it got about 5 arguments injected into the Tagger class.
Doing object didn’t work since @Inject don’t work in Object.
What would the way forward with such a request?