Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Parcelize
- data class MyModel(
- var name: String = "",
- var is_locked: Boolean = true,
- var is_one_size: Boolean = false,
- ) : Parcelable
- private fun initMyModelList(model: MutableList<MyModel>) {
- //i want to access is_locked from here with destruction but i cant ? IDE telling me the type is an int but its clearly defined as a Boolean
- for((is_locked) in model){
- //what i want to do in here is access the is_locked var of the model list and change all of them in a loop. im trying to use Destructuring in loop as a conveience. why is it not working ?
- //how can i make the call signature look like this--- > is_locked = true instad of model.is_locked =true
- }
- }
Add Comment
Please, Sign In to add comment