Koin Annotations offers you the possibility to define a default value for a property, directly from your code with @PropertyValue annotation.
Let's follow our sample:
@Factory
public class ComponentWithProps(
@Property("id") public val id : String
){
public companion object {
@PropertyValue("id")
public const val DEFAULT_ID : String = "_empty_id"
}
}
The generated DSL equivalent will be factory { ComponentWithProps(getProperty("id", ComponentWithProps.DEFAULT_ID)) }
Koin Annotations offers you the possibility to define a default value for a property, directly from your code with
@PropertyValue
annotation. Let's follow our sample:The generated DSL equivalent will be
factory { ComponentWithProps(getProperty("id", ComponentWithProps.DEFAULT_ID)) }
Fix #73