Some context first. In Android using Kotlin, changing the visibility is done like in the following.
myView.visibility = View.VISIBLE
Setting any other
Int value other than
View.GONE returns an error.
Now I have a Kotlin data class that accepts a constructor parameter
flag of type
How do I implement this the same way in my Kotlin code such that
myClass.flag = Flag.A and no other value?