onTap method

Widget onTap(
  1. void event(), {
  2. bool handover = true,
})

A modifier that makes its widget (partially) transparent.

Example:

bool hovering = false;

Text('Tap! tap!')
    .onTap(() {}));

Implementation

Widget onTap(void Function() event, {bool handover = true}) {
  if (handover && this is InkWell) {
    return (this as InkWell).rebase(onTap: event);
  }
  return InkWell(child: this, onTap: event);
}