Scratching my head. I'm copy/pasting some previous code I prototyped, using a LazyColumn and the items() builder like so:
items(items = sortedPlans, key = { plan -> plan.oid })
oid is just a UInt. However, this fails. Digging through Logcat, I find this gem:
java.lang.IllegalArgumentException: Type of the key 2 is not supported. On Android you can only use types which can be stored inside the Bundle.
Going back and looking at what I was doing before, I actually had a Pair there. So I just changed the above code to first:
items(items = sortedPlans, key = { plan -> 'p' to plan.oid })
and that worked!?! As did this:
items(items = sortedPlans, key = { plan -> plan.oid.toInt() })
What strange magic is this? I can't use a UInt? But I can if I wrap it in a pair? Why would that be the case?