onPressed should be specified as a required field to indicate the callback.
final VoidCallback? onPressed;