I want to assign my context in constructor but when I use "this" ide warn me. How can I write code like this Java code below, but in Kotlin:
here is java code
public class LoginApiService {
Context context;
public LoginApiService(Context context) {
this.context = context;
}
}
here is what I want to do
class YLAService {
var context:Context?=null
class YLAService constructor(context: Context) {
this.context=context
}
}