onTap method

Widget onTap(
  1. dynamic onTap(), {
  2. bool inkWell = true,
})

Implementation

Widget onTap(Function() onTap, {bool inkWell = true}) {
  if (inkWell) {
    return InkWell(
      onTap: onTap,
      child: this,
    );
  }
  return GestureDetector(
    onTap: onTap,
    child: this,
  );
}