I have these val:
val starters = rememberSaveable { mutableStateListOf<Course>() }
val firstcourses = rememberSaveable { mutableStateListOf<Course>() }
val secondcourses = rememberSaveable { mutableStateListOf<Course>() }
val sides = rememberSaveable { mutableStateListOf<Course>() }
val fruits = rememberSaveable { mutableStateListOf<Course>() }
val desserts = rememberSaveable { mutableStateListOf<Course>() }
val drinks = rememberSaveable { mutableStateListOf<Course>()}
And when I got this error when passing them to my function:
fun HomePage(
list: SnapshotStateList<RestaurantPreview>,
starters: SnapshotStateList<Course>,
firstcourses: SnapshotStateList<Course>,
secondcourses: SnapshotStateList<Course>,
sides: SnapshotStateList<Course>,
fruits: SnapshotStateList<Course>,
desserts: SnapshotStateList<Course>,
drinks: SnapshotStateList<Course>
){
....
The system suggest me to "Please consider implementing a custom Saver for this class and pass it to rememberSaveable()." Can somebody can help me?