onTap method

Widget onTap(
  1. GestureTapCallback? onTap, {
  2. Key? key,
  3. HitTestBehavior? behavior,
  4. bool excludeFromSemantics = false,
  5. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
})

点击

Implementation

Widget onTap(
  GestureTapCallback? onTap, {
  Key? key,
  HitTestBehavior? behavior,
  bool excludeFromSemantics = false,
  DragStartBehavior dragStartBehavior = DragStartBehavior.start,
}) =>
    gestures(
      key: key,
      onTap: onTap,
      behavior: behavior ?? HitTestBehavior.opaque,
      excludeFromSemantics: excludeFromSemantics,
      dragStartBehavior: dragStartBehavior,
    );