Fix PointerEventConverter doc (#128452)

Follow-up to https://github.com/flutter/flutter/pull/128287.
This commit is contained in:
Michael Goderbauer 2023-06-08 12:36:55 -07:00 committed by GitHub
parent 11c8a626b1
commit 1a6174365c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -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;

View File

@ -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<PointerEvent> expand(Iterable<ui.PointerData> data, DevicePixelRatioGetter devicePixelRatioForView) {
return data
.where((ui.PointerData datum) => datum.signalKind != ui.PointerSignalKind.unknown)