onPressed property
final
An override callback to perform instead of the default behavior which is to pop the Navigator.
It can, for instance, be used to pop the platform's navigation stack via SystemNavigator instead of Flutter's Navigator in add-to-app situations.
Defaults to null.
Implementation
final VoidCallback? onPressed;