createRecognizer method

  1. @override
MultiDragGestureRecognizer createRecognizer()
override

The gesture that starts a drag from this handle.

Override in a subclass to change it, the way TreeDelayedDragHandle does. A named constructor cannot vary behaviour without a discriminating field, so subclassing is the mechanism, matching ReorderableDelayedDragStartListener.

Must return a MultiDragGestureRecognizer: the row services exactly one protocol, and mixing in a single-pointer recognizer would mean two incompatible callback shapes.

Implementation

@override
MultiDragGestureRecognizer createRecognizer() {
  // No `delay:` argument. `DelayedMultiDragGestureRecognizer` already
  // defaults to `kLongPressTimeout`, matching
  // `LongPressGestureRecognizer`.
  return DelayedMultiDragGestureRecognizer(debugOwner: this);
}