Refresh a component when another is clicked

Widgets & Design

Hey everyone.

I have two components on a page - a list of chat threads and a list of messages for a particular chat thread. The idea is that I list the chat threads and when one is selected the chat messages should be displayed for that thread. Hopefully pretty simple - like a master detail view.

The problem is that the page state is being set but the display is not updating and message component is not updating either.

I have attached an image which shows the two components and a debug text placed at the header. I have clicked chat1 but the title has not updated and neither has the messages title.

Am i using the right pattern for this. I would also like to catch the even when the component parameter changes so I can refresh the list of messages. Can this be done?

I appreciate any help solving this or advice on a better way to do it.

Thanks very much

Dean

What have you tried so far?

I have used lots of debug information dialogs to show that the list item selected is working and the callback action is working - see debug message in the screenshot.

The list component has "Update Page on changes" switched on.

I am also using a Rebuild current page in the set state of the callback event.

Did you check FlutterFlow's Documentation for this topic?
Yes