xOnTap method

Widget xOnTap(
  1. Function onTap, {
  2. bool enable = true,
  3. bool withContainer = false,
  4. int cd = 800,
})

Implementation

Widget xOnTap(Function onTap,
    {bool enable = true, bool withContainer = false, int cd = 800}) {
  if (withContainer) {
    return box.color(UIData.clickColor()).make()._tap(() {
      if (enable) {
        onTap();
      }
    });
  }
  return _tap(() {
    if (enable) {
      onTap();
    }
  }, cd: cd);
}