class MyClass{
@field:[Inject Named("the_answer")] lateinit var answer: Int
}
In Android Development, this is the way in which you inject dependencies into Activity
, Fragment
or any other object that is instantiated directly by the OS.
To learn more about the @field:
annotation in Kotlin visit the documentation