onPressed property

FutureOr<void> Function()? onPressed
final

Called when tapped. May be synchronous or asynchronous; when it returns a Future and showLoadingIndicator is true, the button shows a spinner and is disabled until that future completes. If null, the button is disabled.

Implementation

final FutureOr<void> Function()? onPressed;