How to refresh a block when the page is flagged?

I have drupal 8 and the flag module. On my page I have a block. The page can be flagged.

How to refresh a block when the page is flagged ?