Skip to content

Instantly share code, notes, and snippets.

@aqua30
Created June 27, 2022 17:14
Show Gist options
  • Save aqua30/d475be2b7df5d632181e2d8d0490dea0 to your computer and use it in GitHub Desktop.
Save aqua30/d475be2b7df5d632181e2d8d0490dea0 to your computer and use it in GitHub Desktop.
private val itemList = (0..20).map { i ->
AppItem(
id = i,
text = "Item ${i+1}"
)
}
private val _itemsState = mutableStateListOf<AppItem>()
val itemsState: List<AppItem> = _itemsState
init {
_itemsState.addAll(itemList)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment