hold method

void hold (int pointer)

Prevents the arena from being swept.

Typically, a winner is chosen in an arena after all the other PointerUpEvent processing by sweep. If a recognizer wishes to delay resolving an arena past PointerUpEvent, the recognizer can hold the arena open using this function. To release such a hold and let the arena resolve, call release.

See also:

Implementation

void hold(int pointer) {
  final _GestureArena state = _arenas[pointer];
  if (state == null)
    return; // This arena either never existed or has been resolved.
  state.isHeld = true;
  assert(_debugLogDiagnostic(pointer, 'Holding', state));
}