onPressed property

VoidCallback onPressed
final

The callback that is called when the button is selected.

The button can be selected by either by tapping on this button or by pressing elsewhere and sliding onto this button before releasing.

Implementation

final VoidCallback onPressed;