onTap method

Widget? onTap(
  1. void function()?, {
  2. bool ink = false,
})

Implementation

Widget? onTap(void Function()? function, {bool ink = false}) {
  return function != null
      ? ink
          ? InkWell(
              onTap: function,
              child: this,
            )
          : GestureDetector(
              onTap: function,
              child: this,
            )
      : this;
}