@@ -71,6 +71,7 @@ enum PointerSignalKind {
71
71
class PointerData {
72
72
/// Creates an object that represents the state of a pointer.
73
73
const PointerData ({
74
+ this .embedderId = 0 ,
74
75
this .timeStamp = Duration .zero,
75
76
this .change = PointerChange .cancel,
76
77
this .kind = PointerDeviceKind .touch,
@@ -101,6 +102,13 @@ class PointerData {
101
102
this .scrollDeltaY = 0.0 ,
102
103
});
103
104
105
+ /// Unique identifier that ties the [PointerEvent] to embedder event created it.
106
+ ///
107
+ /// No two pointer events can have the same [embedderId] . This is different from
108
+ /// [pointerIdentifier] - used for hit-testing, whereas [embedderId] is used to
109
+ /// identify the platform event.
110
+ final int embedderId;
111
+
104
112
/// Time of event dispatch, relative to an arbitrary timeline.
105
113
final Duration timeStamp;
106
114
@@ -257,46 +265,47 @@ class PointerData {
257
265
final double scrollDeltaY;
258
266
259
267
@override
260
- String toString () => '$ runtimeType (x: $physicalX , y: $physicalY )' ;
268
+ String toString () => 'PointerData (x: $physicalX , y: $physicalY )' ;
261
269
262
270
/// Returns a complete textual description of the information in this object.
263
271
String toStringFull () {
264
272
return '$runtimeType ('
265
- 'timeStamp: $timeStamp , '
266
- 'change: $change , '
267
- 'kind: $kind , '
268
- 'signalKind: $signalKind , '
269
- 'device: $device , '
270
- 'pointerIdentifier: $pointerIdentifier , '
271
- 'physicalX: $physicalX , '
272
- 'physicalY: $physicalY , '
273
- 'physicalDeltaX: $physicalDeltaX , '
274
- 'physicalDeltaY: $physicalDeltaY , '
275
- 'buttons: $buttons , '
276
- 'synthesized: $synthesized , '
277
- 'pressure: $pressure , '
278
- 'pressureMin: $pressureMin , '
279
- 'pressureMax: $pressureMax , '
280
- 'distance: $distance , '
281
- 'distanceMax: $distanceMax , '
282
- 'size: $size , '
283
- 'radiusMajor: $radiusMajor , '
284
- 'radiusMinor: $radiusMinor , '
285
- 'radiusMin: $radiusMin , '
286
- 'radiusMax: $radiusMax , '
287
- 'orientation: $orientation , '
288
- 'tilt: $tilt , '
289
- 'platformData: $platformData , '
290
- 'scrollDeltaX: $scrollDeltaX , '
291
- 'scrollDeltaY: $scrollDeltaY '
292
- ')' ;
273
+ 'embedderId: $embedderId , '
274
+ 'timeStamp: $timeStamp , '
275
+ 'change: $change , '
276
+ 'kind: $kind , '
277
+ 'signalKind: $signalKind , '
278
+ 'device: $device , '
279
+ 'pointerIdentifier: $pointerIdentifier , '
280
+ 'physicalX: $physicalX , '
281
+ 'physicalY: $physicalY , '
282
+ 'physicalDeltaX: $physicalDeltaX , '
283
+ 'physicalDeltaY: $physicalDeltaY , '
284
+ 'buttons: $buttons , '
285
+ 'synthesized: $synthesized , '
286
+ 'pressure: $pressure , '
287
+ 'pressureMin: $pressureMin , '
288
+ 'pressureMax: $pressureMax , '
289
+ 'distance: $distance , '
290
+ 'distanceMax: $distanceMax , '
291
+ 'size: $size , '
292
+ 'radiusMajor: $radiusMajor , '
293
+ 'radiusMinor: $radiusMinor , '
294
+ 'radiusMin: $radiusMin , '
295
+ 'radiusMax: $radiusMax , '
296
+ 'orientation: $orientation , '
297
+ 'tilt: $tilt , '
298
+ 'platformData: $platformData , '
299
+ 'scrollDeltaX: $scrollDeltaX , '
300
+ 'scrollDeltaY: $scrollDeltaY '
301
+ ')' ;
293
302
}
294
303
}
295
304
296
305
/// A sequence of reports about the state of pointers.
297
306
class PointerDataPacket {
298
307
/// Creates a packet of pointer data reports.
299
- const PointerDataPacket ({this .data = const < PointerData > []}) : assert (data != null ); // ignore: unnecessary_null_comparison
308
+ const PointerDataPacket ({ this .data = const < PointerData > [] }) : assert (data != null ); // ignore: unnecessary_null_comparison
300
309
301
310
/// Data about the individual pointers in this packet.
302
311
///
0 commit comments