onPressed property

VoidCallback? onPressed
final

Called when the button is tapped.

When null the button is rendered in its disabled state. When autoPending is true, the callback may return a Future; the button will remain in the pending state until that future completes.

Implementation

final VoidCallback? onPressed;