I'm curious about how to implement a feature that changes the material color of the floor each time a button in the ListView is pressed.

You must call your data object from your ListItem widget

In the data object you create and call an event dispatch:


Here you can set any kind of data in the dispatch directly from the relevant data object.

In your main widget when you create each data object you bind to their event dispatch

Now you have the correct data in your OnColorChange event in your main widget when a button is clicked. You can calculate the color here if you haven’t already, change the color of the floor directly or send the data to another manager object that handles that.

1 Like