asSemanticButton method

Widget asSemanticButton({
  1. String? label,
  2. VoidCallback? onTap,
})

Mark this widget as a button for screen readers.

Implementation

Widget asSemanticButton({String? label, VoidCallback? onTap}) {
  return Semantics(
    button: true,
    label: label,
    onTap: onTap,
    child: this,
  );
}