From 1a6174365cf46ec8a51019482ee8cfece4ca7dba Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 8 Jun 2023 12:36:55 -0700 Subject: [PATCH] Fix PointerEventConverter doc (#128452) Follow-up to https://github.com/flutter/flutter/pull/128287. --- packages/flutter/lib/src/gestures/binding.dart | 1 - packages/flutter/lib/src/gestures/converter.dart | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/flutter/lib/src/gestures/binding.dart b/packages/flutter/lib/src/gestures/binding.dart index c848d0486b1..efe8c33a1b7 100644 --- a/packages/flutter/lib/src/gestures/binding.dart +++ b/packages/flutter/lib/src/gestures/binding.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - import 'dart:async'; import 'dart:collection'; import 'dart:ui' as ui show PointerDataPacket; diff --git a/packages/flutter/lib/src/gestures/converter.dart b/packages/flutter/lib/src/gestures/converter.dart index 4892259eafd..5a5fcdd7c40 100644 --- a/packages/flutter/lib/src/gestures/converter.dart +++ b/packages/flutter/lib/src/gestures/converter.dart @@ -53,10 +53,10 @@ abstract final class PointerEventConverter { /// Expand the given packet of pointer data into a sequence of framework /// pointer events. /// - /// The `devicePixelRatio` argument (usually given the value from - /// [dart:ui.FlutterView.devicePixelRatio]) is used to convert the incoming data - /// from physical coordinates to logical pixels. See the discussion at - /// [PointerEvent] for more details on the [PointerEvent] coordinate space. + /// The `devicePixelRatioForView` is used to obtain the device pixel ratio for + /// the view a particular event occurred in to convert its data from physical + /// coordinates to logical pixels. See the discussion at [PointerEvent] for + /// more details on the [PointerEvent] coordinate space. static Iterable expand(Iterable data, DevicePixelRatioGetter devicePixelRatioForView) { return data .where((ui.PointerData datum) => datum.signalKind != ui.PointerSignalKind.unknown)