There is an interface in which I try to declare a ...
# android
m
There is an interface in which I try to declare a variable
Copy code
interface ApiInterface {
object Prop {
        operator fun getValue(thisRef: Any, property: KProperty<*>): String = "message"
    }
 @Multipart
    @POST(API_FEEDBACK_PATH)
    fun postFeedback(@Part("message") message: RequestBody,
                     @PartMap files: HashMap<String, RequestBody>,
                     @Part database: MultipartBody.Part?): Call<FeedbackResponse>
}

val ApiInterface.prop: String by ApiInterface.Prop
Instead of the "message" in the fun postFeedback, I try to put
ApiInterface.Prop.getValue()
but it doesn t work for me(