PrimaryPointerGestureRecognizer constructor

PrimaryPointerGestureRecognizer({
  1. Duration? deadline,
  2. double? preAcceptSlopTolerance = _unsetTouchSlop,
  3. double? postAcceptSlopTolerance = _unsetTouchSlop,
  4. Object? debugOwner,
  5. Set<PointerDeviceKind>? supportedDevices,
  6. AllowedButtonsFilter allowedButtonsFilter = _defaultButtonAcceptBehavior,
})

Initializes the deadline field during construction of subclasses.

It's possible to limit this recognizer to a specific set of PointerDeviceKinds by providing the optional supportedDevices argument. If supportedDevices is null, the recognizer will accept pointer events from all device kinds.

Implementation

PrimaryPointerGestureRecognizer({
  this.deadline,
  double? preAcceptSlopTolerance = _unsetTouchSlop,
  double? postAcceptSlopTolerance = _unsetTouchSlop,
  super.debugOwner,
  super.supportedDevices,
  super.allowedButtonsFilter,
}) : assert(
       preAcceptSlopTolerance == _unsetTouchSlop ||
           preAcceptSlopTolerance == null ||
           preAcceptSlopTolerance >= 0,
       'The preAcceptSlopTolerance must be unspecified, positive, or null',
     ),
     assert(
       postAcceptSlopTolerance == _unsetTouchSlop ||
           postAcceptSlopTolerance == null ||
           postAcceptSlopTolerance >= 0,
       'The postAcceptSlopTolerance must be unspecified, positive, or null',
     ),
     _preAcceptSlopTolerance = preAcceptSlopTolerance,
     _postAcceptSlopTolerance = postAcceptSlopTolerance;