How can we define static variable for a class member in Kotlin Android?
I have reviewed for couple of days after i found that how can we do static variable in android kotlin.
Here is demo code example.
Here is demo code example.
class App : Application() { companion object { var myModel: MyModel? = null } override fun onCreate() { super.onCreate() } }
Thanks
Comments
Post a Comment