PrimaryPointerGestureRecognizer constructor Null safety

PrimaryPointerGestureRecognizer(
  1. {Duration? deadline,
  2. double? preAcceptSlopTolerance,
  3. double? postAcceptSlopTolerance,
  4. Object? debugOwner,
  5. @Deprecated('Migrate to supportedDevices. ' 'This feature was deprecated after v2.3.0-1.0.pre.') PointerDeviceKind? kind,
  6. Set<PointerDeviceKind>? supportedDevices}
)

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,
  this.preAcceptSlopTolerance = kTouchSlop,
  this.postAcceptSlopTolerance = kTouchSlop,
  Object? debugOwner,
  @Deprecated(
    'Migrate to supportedDevices. '
    'This feature was deprecated after v2.3.0-1.0.pre.',
  )
  PointerDeviceKind? kind,
  Set<PointerDeviceKind>? supportedDevices,
}) : assert(
       preAcceptSlopTolerance == null || preAcceptSlopTolerance >= 0,
       'The preAcceptSlopTolerance must be positive or null',
     ),
     assert(
       postAcceptSlopTolerance == null || postAcceptSlopTolerance >= 0,
       'The postAcceptSlopTolerance must be positive or null',
     ),
     super(
       debugOwner: debugOwner,
       kind: kind,
       supportedDevices: supportedDevices,
     );