onHighlightChanged property

ValueChanged<bool>? onHighlightChanged
final

Called when this part of the material either becomes highlighted or stops being highlighted.

The value passed to the callback is true if this part of the material has become highlighted and false if this part of the material has stopped being highlighted.

If all of onTap, onDoubleTap, and onLongPress become null while a gesture is ongoing, then onTapCancel will be fired and onHighlightChanged will be fired with the value false during the build. This means, for instance, that in that scenario State.setState cannot be called.

Implementation

final ValueChanged<bool>? onHighlightChanged;