Skip to content

Instantly share code, notes, and snippets.

@mohanmanu484
Created January 2, 2024 09:37
Show Gist options
  • Select an option

  • Save mohanmanu484/646690f99aa7cb332b0c18fb699af814 to your computer and use it in GitHub Desktop.

Select an option

Save mohanmanu484/646690f99aa7cb332b0c18fb699af814 to your computer and use it in GitHub Desktop.
Checkbox custom state saver
val CheckBoxStateSaver = listSaver<CheckBoxState, Any>(
save = {
listOf<Any>(it.isSelected,it.name)
},
restore = { data->
CheckBoxState(isSelected = data[0] as Boolean,data[1] as String)
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment