onClose property
void Function()?
onClose
final
Called when a user clicks the close button Add your own close logic is the default does not yield good behaviour
Implementation
final void Function()? onClose;