CustomGestureElementDetector typedef

CustomGestureElementDetector = RumGestureDetectorInfo? Function(Widget widget)

This function type allows you to define custom criteria for gesture detection within your widget tree. It accepts a Widget as input and returns a RumGestureDetectorInfo if the widget meets the specified criteria, or null otherwise.

This function is used by the RumUserActionDetector to detect custom gesture detectors.

Example use:

RumUserActionDetector(
  customGestureDetector: (widget) {
     if (widget is CustomButton) {
       return RumGestureDetectorInfo('CustomButton');
     }
     return null;
   },
  // other fields...
)

Implementation

typedef CustomGestureElementDetector = RumGestureDetectorInfo? Function(
    Widget widget);