PointerEvent constructor

const PointerEvent(
  1. {int embedderId: 0,
  2. Duration timeStamp: Duration.zero,
  3. int pointer: 0,
  4. PointerDeviceKind kind: PointerDeviceKind.touch,
  5. int device: 0,
  6. Offset position: Offset.zero,
  7. Offset localPosition,
  8. Offset delta: Offset.zero,
  9. Offset localDelta,
  10. int buttons: 0,
  11. bool down: false,
  12. bool obscured: false,
  13. double pressure: 1.0,
  14. double pressureMin: 1.0,
  15. double pressureMax: 1.0,
  16. double distance: 0.0,
  17. double distanceMax: 0.0,
  18. double size: 0.0,
  19. double radiusMajor: 0.0,
  20. double radiusMinor: 0.0,
  21. double radiusMin: 0.0,
  22. double radiusMax: 0.0,
  23. double orientation: 0.0,
  24. double tilt: 0.0,
  25. int platformData: 0,
  26. bool synthesized: false,
  27. Matrix4 transform,
  28. PointerEvent original}
)

Abstract const constructor. This constructor enables subclasses to provide const constructors so that they can be used in const expressions.

Implementation

const PointerEvent({
  this.embedderId = 0,
  this.timeStamp = Duration.zero,
  this.pointer = 0,
  this.kind = PointerDeviceKind.touch,
  this.device = 0,
  this.position = Offset.zero,
  Offset localPosition,
  this.delta = Offset.zero,
  Offset localDelta,
  this.buttons = 0,
  this.down = false,
  this.obscured = false,
  this.pressure = 1.0,
  this.pressureMin = 1.0,
  this.pressureMax = 1.0,
  this.distance = 0.0,
  this.distanceMax = 0.0,
  this.size = 0.0,
  this.radiusMajor = 0.0,
  this.radiusMinor = 0.0,
  this.radiusMin = 0.0,
  this.radiusMax = 0.0,
  this.orientation = 0.0,
  this.tilt = 0.0,
  this.platformData = 0,
  this.synthesized = false,
  this.transform,
  this.original,
}) : localPosition = localPosition ?? position,
     localDelta = localDelta ?? delta;