a function called when user clicks the close button on mono's page
final Function(String? code)? onClosed;