transformed method

  1. @override
PointerHoverEvent transformed (
  1. Matrix4 transform

Transforms the event from the global coordinate space into the coordinate space of an event receiver.

The coordinate space of the event receiver is described by transform. A null value for transform is treated as the identity transformation.

The method may return the same object instance if for example the transformation has no effect on the event.

Transforms are not commutative. If this method is called on a PointerEvent that has a non-null transform value, that value will be overridden by the provided transform.


PointerHoverEvent transformed(Matrix4 transform) {
  if (transform == null || transform == this.transform) {
    return this;
  final Offset transformedPosition = PointerEvent.transformPosition(transform, position);
  return PointerHoverEvent(
    timeStamp: timeStamp,
    kind: kind,
    device: device,
    position: position,
    localPosition: transformedPosition,
    delta: delta,
    localDelta: PointerEvent.transformDeltaViaPositions(
      transform: transform,
      untransformedDelta: delta,
      untransformedEndPosition: position,
      transformedEndPosition: transformedPosition,
    buttons: buttons,
    obscured: obscured,
    pressureMin: pressureMin,
    pressureMax: pressureMax,
    distance: distance,
    distanceMax: distanceMax,
    size: size,
    radiusMajor: radiusMajor,
    radiusMinor: radiusMinor,
    radiusMin: radiusMin,
    radiusMax: radiusMax,
    orientation: orientation,
    tilt: tilt,
    synthesized: synthesized,
    transform: transform,
    original: original as PointerHoverEvent ?? this,