onPressed method

void onPressed()

Implementation

void onPressed() => widget.onPressed?.call();