GestureRecognizer constructor
- {Object? debugOwner,
- Set<
PointerDeviceKind> ? supportedDevices, - AllowedButtonsFilter? allowedButtonsFilter}
Initializes the gesture recognizer.
The argument is optional and is only used for debug purposes (e.g. in the toString serialization).
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
GestureRecognizer({
this.debugOwner,
this.supportedDevices,
AllowedButtonsFilter? allowedButtonsFilter,
}) : _allowedButtonsFilter = allowedButtonsFilter ?? _defaultButtonAcceptBehavior {
// TODO(polina-c): stop duplicating code across disposables
// https://github.com/flutter/flutter/issues/137435
if (kFlutterMemoryAllocationsEnabled) {
FlutterMemoryAllocations.instance.dispatchObjectCreated(
library: 'package:flutter/gestures.dart',
className: '$GestureRecognizer',
object: this,
);
}
}