tylerwilson
10/02/2018, 7:02 PMsealed class ItemType {
object Header: ItemType()
data class CartItem(val cart: Cart): ItemType()
}
I would like these to map to an Int for the RecyclerView ViewType. It works okay with the object since it has a hashCode, but when doing a when for the CartItem there is no ordinal/hashCode.
Anybody have an example of doing something like this? A quick google search did not turn up anything. Thank you!