dragDevices property

  1. @override
Set<PointerDeviceKind> get dragDevices
override

The device kinds that the scrollable will accept drag gestures from.

By default only PointerDeviceKind.touch, PointerDeviceKind.stylus, PointerDeviceKind.invertedStylus, and PointerDeviceKind.trackpad are configured to create drag gestures. Enabling this for PointerDeviceKind.mouse will make it difficult or impossible to select text in scrollable containers and is not recommended.

Implementation

@override
Set<PointerDeviceKind> get dragDevices => {
      PointerDeviceKind.touch,
      if (allowMouseDragging) PointerDeviceKind.mouse,
      PointerDeviceKind.stylus,
      PointerDeviceKind.invertedStylus,
      PointerDeviceKind.trackpad,
      // The VoiceAccess sends pointer events with unknown type when scrolling
      // scrollables.
      PointerDeviceKind.unknown,
    };