How to Detect a Dialog closing

I have a View Class, from which a Dialog can be opened. I would like to run a Method in the View Class after the Dialog has been closed to Update some Content there. Is there a way to detect this? What would be the correct way to do this?

Hi Roman. I think the https://vaadin.com/api/platform/14.1.1/com/vaadin/flow/component/dialog/Dialog.html#addOpenedChangeListener-com.vaadin.flow.component.ComponentEventListener- does the job, you just need to check the event.isOpened() method that was it closed or opened https://vaadin.com/api/platform/14.1.1/com/vaadin/flow/component/dialog/GeneratedVaadinDialog.OpenedChangeEvent.html#isOpened--