-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Feature description
Flutter GestureDetector and InkWell both support a wide range of gestures to be detected without any additional user implementation :
onTap
onDoubleTap
onLongPress
onTapDown
onTapUp
onTapCancel
onSecondaryTap
onSecondaryTapUp
onSecondaryTapDown
onSecondaryTapCancelToday RumUserActionDetector only supports onTap events which is really nice, but not enough when going further with an application. The long press, for example, is a common scenario in a mobile environment.
Note that scrolling in lists or other scrollable elements could also be detected and sent to Datadog (RumActionType.scroll exists but AFAIK it is never populated). Although this could probably be another issue entirely depending on how you want it to be separated.
Proposed solution
I guess RumUserActionDetector method _onPointerUp could be tweaked a little bit to handle more touch scenarii, but I'm not sure exactly how.
It would also means that:
- Detection of the widgets down the tree should probably be adapted to support those events, e.g.:
wouldn't work well.
if (widget is InkWell) { if (widget.onTap != null) { elementName = 'InkWell'; searchForBetter = true; searchForText = false; } }
- Datadog available range of actions could be extended : from
enum RumActionType { tap, scroll, swipe, custom }toenum RumActionType { tap, longTap, doubleTap, ..., scroll, swipe, custom }
Other relevant information
No response