updateGestureRecognizers method

void updateGestureRecognizers (Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers)

Updates which gestures should be forwarded to the platform view.

Gesture recognizers created by factories in this set participate in the gesture arena for each pointer that was put down on the render box. If any of the recognizers on this list wins the gesture arena, the entire pointer event sequence starting from the pointer down event will be dispatched to the Android view.

The gestureRecognizers property must not contain more than one factory with the same Factory.type.

Setting a new set of gesture recognizer factories with the same Factory.types as the current set has no effect, because the factories' constructors would have already been called with the previous set.

Implementation

void updateGestureRecognizers(Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers) {
  assert(gestureRecognizers != null);
  assert(
  _factoriesTypeSet(gestureRecognizers).length == gestureRecognizers.length,
  'There were multiple gesture recognizer factories for the same type, there must only be a single '
      'gesture recognizer factory for each gesture recognizer type.',);
  if (_factoryTypesSetEquals(gestureRecognizers, _gestureRecognizer?.gestureRecognizerFactories)) {
    return;
  }
  _gestureRecognizer?.dispose();
  _gestureRecognizer = _UiKitViewGestureRecognizer(viewController, gestureRecognizers);
}