I have an app that displays a black dot at the point where the user touches the screen like this:

The black dot can be moved by the user as he/she drags his finger on the screen.

The background is an expensive paint operation, so I have created two separate widgets in a stack, hoping that the background widget painting will be stored in the Flutter raster cache. But it's not stored - Flutter calls my expensive paint method every time the black dot moves.

What am I doing wrong?

Here's my code: