isTap method

void isTap(
  1. void function(
    1. bool
    )
)

Called whenever the tap state on the widget changes.

This changes this

..onTapDown((_) => setState(() => pressed = true))
..onTapUp((_) => setState(() => pressed = false))
..onTapCancel(() => setState(() => pressed = false))

to this

..isTap((isTapped) => setState(() => pressed = isTapped))

Implementation

void isTap(void Function(bool) function) => gestureModel.isTap = function;