Being true by default, it says whether to dismiss the dialog regardless of onPressed being set.
final bool closeOnPress;