swayze
swayze copied to clipboard
Example how to update data
Summary
I would be super helpful to have an example of how to change data. For example I want to create a new cell or change a cells position. What is the best way to update the UI?
Thank you very much that you have made your code open source 💙
Acceptance criteria
Technical details
I found the putRawCells method in the SwayzeCellsController and it uses updateState.
I tried to use it like this:
cellsController.updateState((modifier) { modifier.putCell(cellParser(element)); });
But I will not update the UI. It only adds the new cell to the matrix but is does not trigger a rebuild. Only when I scroll so far that the cell is not visible any more and scroll back then it renders the new cell.