onPressed property

VoidCallback? onPressed
final

Runs it (usually Navigator.pop with an answer); null disables it.

Implementation

final VoidCallback? onPressed;