How to Create an Undo/Redo Button for Coloring/Drawing App?

Hello! I’m a beginner, and I would like to say Thunkable is GREAT! I’ve been able to create everything I’ve needed to for my app using the docs and the community boards, but I’ve finally hit a problem I haven’t been able to solve on my own.

I’m trying to create an Undo/Redo button for my coloring/drawing app.

I’m using the canvas block and touch drawing, and I was hoping there was a way to save each stroke that the user makes and then when they press an “undo button”, it would reveal the last canvas that was saved making it appear as if they had undone what was previously there.

Please let me know if there is a document, tutorial, or a solution that I’m unaware of that would point me in the right direction. Thank you for your assistance!