rejectGesture method Null safety

  1. @override
void rejectGesture(
  1. int pointer
)
override

Called when this member loses the arena for the given pointer id.

Implementation

@override
void rejectGesture(int pointer) {
  assert(_pointers != null);
  if (_pointers!.containsKey(pointer)) {
    final MultiDragPointerState state = _pointers![pointer]!;
    assert(state != null);
    state.rejected();
    _removeState(pointer);
  } // else we already preemptively forgot about it (e.g. we got an up event)
}