onPressed property

VoidCallback? onPressed
final

Callback when the button is pressed.

If null, the action is disabled: it stays in place, ignores taps, and is reported as disabled to assistive technology. On GlassStyle.ios27 and GlassStyle.ios26 a disabled action (including a primary or tinted action) reverts to the neutral capsule wash and draws its title in CupertinoColors.tertiaryLabel, matching a disabled UIAlertAction; on GlassStyle.classic the button is dimmed like any disabled GlassButton.

Implementation

final VoidCallback? onPressed;