I am implementing a dialog. However I want to wait before the dialog is closed to return the variable. To do so, I tried to implement the
dialog
variable