mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix PointerEventConverter doc (#128452)
Follow-up to https://github.com/flutter/flutter/pull/128287.
This commit is contained in:
parent
11c8a626b1
commit
1a6174365c
@ -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;
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user