onClosePressed method
Implementation
void onClosePressed(BuildContext context) async {
if (options.onClosePressed != null) {
var close = await options.onClosePressed!(event);
if (close) Navigator.of(context).pop();
} else {
Navigator.of(context).pop();
}
}