isPressed property

ValueNotifier<bool> isPressed
final

Whether the user is currently pressing this widget.

Set true on onTapDown / onPointerDown, false on onTapUp / onTapCancel / onPointerUp / onPointerCancel.

Implementation

final ValueNotifier<bool> isPressed = ValueNotifier(false);