Ref: How can I select Widgets by dragging over them but also clicking them individually in flutter?
I followed the codebase on this link and I am successful in creating a grid view where on selection the color changes however I am unable to understand the way of undoing it.
Suppose a user selected a cell and now he wants to undo it, then how to do it. Further, I want to save this data in DB through JSON regarding which all cells were selected and how will the grid be.