onPressed property

Future<void> Function() onPressed
final

The callback that is called when the button is tapped.

This callback can be asynchronous and is invoked only once per press. It is responsible for handling the primary action of the button.

Implementation

final Future<void> Function() onPressed;