onPressed property

VoidCallback? onPressed
final

Callback invoked when the action is tapped or activated from the keyboard.

When null, the action is disabled: it stays in place, ignores input, reverts to the neutral capsule wash, and announces as disabled to assistive technology.

Implementation

final VoidCallback? onPressed;