Skip to content

Commit 0f6244f

Browse files
authored
Export public API types from gestures/*.dart library (#105864)
1 parent 0cdbe1f commit 0f6244f

32 files changed

+108
-37
lines changed

packages/flutter/lib/src/gestures/binding.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ import 'pointer_router.dart';
1919
import 'pointer_signal_resolver.dart';
2020
import 'resampler.dart';
2121

22+
export 'dart:ui' show Offset;
23+
24+
export 'package:flutter/foundation.dart' show DiagnosticsNode, InformationCollector;
25+
26+
export 'arena.dart' show GestureArenaManager;
27+
export 'events.dart' show PointerEvent;
28+
export 'hit_test.dart' show HitTestEntry, HitTestTarget, HitTestResult;
29+
export 'pointer_router.dart' show PointerRouter;
30+
export 'pointer_signal_resolver.dart' show PointerSignalResolver;
31+
2232
typedef _HandleSampleTimeChangedCallback = void Function();
2333

2434
/// Class that implements clock used for sampling.

packages/flutter/lib/src/gestures/converter.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import 'dart:ui' as ui show PointerData, PointerChange, PointerSignalKind;
77

88
import 'events.dart';
99

10+
export 'dart:ui' show PointerData;
11+
12+
export 'events.dart' show PointerEvent;
13+
1014
// Add `kPrimaryButton` to [buttons] when a pointer of certain devices is down.
1115
//
1216
// TODO(tongmu): This patch is supposed to be done by embedders. Patching it

packages/flutter/lib/src/gestures/drag.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
65
import 'drag_details.dart';
76

7+
export 'drag_details.dart' show DragEndDetails, DragUpdateDetails;
8+
89
/// Interface for objects that receive updates about drags.
910
///
1011
/// This interface is used in various ways. For example,

packages/flutter/lib/src/gestures/drag_details.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
6-
import 'dart:ui' show Offset, PointerDeviceKind;
7-
85
import 'package:flutter/foundation.dart';
96

107
import 'velocity_tracker.dart';
118

9+
export 'dart:ui' show Offset, PointerDeviceKind;
10+
11+
export 'velocity_tracker.dart' show Velocity;
12+
1213
/// Details object for callbacks that use [GestureDragDownCallback].
1314
///
1415
/// See also:

packages/flutter/lib/src/gestures/eager.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
6-
import 'arena.dart';
7-
import 'events.dart';
85
import 'recognizer.dart';
96

7+
export 'dart:ui' show PointerDeviceKind;
8+
9+
export 'events.dart' show PointerDownEvent, PointerEvent;
10+
1011
/// A gesture recognizer that eagerly claims victory in all gesture arenas.
1112
///
1213
/// This is typically passed in [AndroidView.gestureRecognizers] in order to immediately dispatch

packages/flutter/lib/src/gestures/events.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ import 'gesture_settings.dart';
1313

1414
export 'dart:ui' show Offset, PointerDeviceKind;
1515

16+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
17+
export 'package:vector_math/vector_math_64.dart' show Matrix4;
18+
19+
export 'gesture_settings.dart' show DeviceGestureSettings;
20+
1621
/// The bit of [PointerEvent.buttons] that corresponds to a cross-device
1722
/// behavior of "primary operation".
1823
///

packages/flutter/lib/src/gestures/force_press.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
// found in the LICENSE file.
44

55
import 'package:flutter/foundation.dart' show clampDouble;
6-
import 'arena.dart';
6+
77
import 'events.dart';
88
import 'recognizer.dart';
99

10+
export 'dart:ui' show Offset, PointerDeviceKind;
11+
12+
export 'events.dart' show PointerDownEvent, PointerEvent;
13+
1014
enum _ForceState {
1115
// No pointer has touched down and the detector is ready for a pointer down to occur.
1216
ready,

packages/flutter/lib/src/gestures/gesture_settings.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
// found in the LICENSE file.
44

55
import 'dart:ui' as ui;
6+
67
import 'package:flutter/foundation.dart';
78

9+
export 'dart:ui' show FlutterView;
10+
811
/// The device specific gesture settings scaled into logical pixels.
912
///
1013
/// This configuration can be retrieved from the window, or more commonly from a

packages/flutter/lib/src/gestures/hit_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ import 'package:vector_math/vector_math_64.dart';
88

99
import 'events.dart';
1010

11+
export 'dart:ui' show Offset;
12+
13+
export 'package:vector_math/vector_math_64.dart' show Matrix4;
14+
15+
export 'events.dart' show PointerEvent;
16+
1117
/// An object that can hit-test pointers.
1218
abstract class HitTestable {
1319
// This class is intended to be used as an interface, and should not be

packages/flutter/lib/src/gestures/long_press.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
6-
import 'arena.dart';
75
import 'constants.dart';
86
import 'events.dart';
97
import 'recognizer.dart';
108
import 'velocity_tracker.dart';
119

10+
export 'dart:ui' show Offset, PointerDeviceKind;
11+
12+
export 'arena.dart' show GestureDisposition;
13+
export 'events.dart' show PointerDownEvent, PointerEvent;
14+
export 'velocity_tracker.dart' show Velocity;
15+
1216
/// Callback signature for [LongPressGestureRecognizer.onLongPressDown].
1317
///
1418
/// Called when a pointer that might cause a long-press has contacted the

0 commit comments

Comments
 (0)