onTap method

Widget onTap(
  1. VoidCallback callback
)

Adds an onTap gesture using InkWell over a transparent Material.

Implementation

Widget onTap(VoidCallback callback) {
  return Material(
    type: MaterialType.transparency,
    child: InkWell(
      onTap: callback,
      splashColor: Colors.transparent,
      highlightColor: Colors.transparent,
      child: this,
    ),
  );
}