How can I automatically assign a variable to a variable by type in a real template?
Using dagger, Im injecting fields a lot - so I created a live template to declare the injected variable:
@Inject lateinit var $var$: $TYPE$
In Java, a similar live template will automatically populate the repository as I have given the type Repository
.
In Kotlin, however, this is not the case. But I'm sure it's possible?
+3
source to share
2 answers