Skip to content

Commit bbdf617

Browse files
authored
Export public API types from services/*.dart library (#106316)
1 parent c0ac61b commit bbdf617

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+131
-39
lines changed

dev/benchmarks/platform_channels_benchmarks/lib/main.dart

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import 'dart:async';
66
import 'dart:math' as math;
7-
import 'dart:typed_data';
87

98
import 'package:flutter/foundation.dart' show kDebugMode;
109
import 'package:flutter/material.dart';

dev/integration_tests/channels/lib/src/basic_messaging.dart

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import 'dart:async';
66

7-
import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
87
import 'package:flutter/services.dart';
98

109
import 'pair.dart';

dev/integration_tests/flutter_gallery/test/example_code_parser_test.dart

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'dart:typed_data';
6-
75
import 'package:flutter/services.dart';
86
import 'package:flutter_gallery/gallery/example_code_parser.dart';
97
import 'package:flutter_test/flutter_test.dart';

dev/tools/gen_keycodes/data/keyboard_key.tmpl

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import 'package:flutter/foundation.dart';
66

7+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
8+
79
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
810
// This file is generated by dev/tools/gen_keycodes/bin/gen_keycodes.dart and
911
// should not be edited directly.

dev/tools/gen_keycodes/data/keyboard_maps.tmpl

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
import 'keyboard_key.dart';
1313

14+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
15+
1416
/// Maps Android-specific key codes to the matching [LogicalKeyboardKey].
1517
const Map<int, LogicalKeyboardKey> kAndroidToLogicalKey = <int, LogicalKeyboardKey>{
1618
@@@ANDROID_KEY_CODE_MAP@@@

examples/image_list/lib/main.dart

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import 'dart:async';
66
import 'dart:io';
77
import 'dart:math';
8-
import 'dart:typed_data';
98
import 'package:flutter/material.dart';
109
import 'package:flutter/services.dart';
1110

packages/flutter/lib/src/rendering/view.dart

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'dart:ui' as ui show Scene, SceneBuilder, FlutterView;
88

99
import 'package:flutter/foundation.dart';
1010
import 'package:flutter/services.dart';
11-
import 'package:vector_math/vector_math_64.dart';
1211

1312
import 'binding.dart';
1413
import 'box.dart';

packages/flutter/lib/src/services/asset_bundle.dart

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import 'package:flutter/foundation.dart';
1111

1212
import 'binding.dart';
1313

14+
export 'dart:typed_data' show ByteData;
15+
export 'dart:ui' show ImmutableBuffer;
16+
1417
/// A collection of resources used by the application.
1518
///
1619
/// Asset bundles contain resources, such as images and strings, that can be

packages/flutter/lib/src/services/autofill.dart

+3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
// found in the LICENSE file.
44

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

9+
export 'text_input.dart' show TextEditingValue, TextInputClient, TextInputConfiguration, TextInputConnection;
10+
811
/// A collection of commonly used autofill hint strings on different platforms.
912
///
1013
/// Each hint is pre-defined on at least one supported platform. See their

packages/flutter/lib/src/services/binary_messenger.dart

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import 'dart:typed_data';
66
import 'dart:ui' as ui;
77

8+
export 'dart:typed_data' show ByteData;
9+
export 'dart:ui' show PlatformMessageResponseCallback;
10+
811
/// A function which takes a platform message and asynchronously returns an encoded response.
912
typedef MessageHandler = Future<ByteData?>? Function(ByteData? message);
1013

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ import 'asset_bundle.dart';
1414
import 'binary_messenger.dart';
1515
import 'hardware_keyboard.dart';
1616
import 'message_codec.dart';
17-
import 'raw_keyboard.dart';
1817
import 'restoration.dart';
1918
import 'system_channels.dart';
2019
import 'text_input.dart';
2120

21+
export 'dart:ui' show ChannelBuffers;
22+
23+
export 'binary_messenger.dart' show BinaryMessenger;
24+
export 'hardware_keyboard.dart' show HardwareKeyboard, KeyEventManager;
25+
export 'restoration.dart' show RestorationManager;
26+
2227
/// Listens for platform messages and directs them to the [defaultBinaryMessenger].
2328
///
2429
/// The [ServicesBinding] also registers a [LicenseEntryCollector] that exposes

packages/flutter/lib/src/services/debug.dart

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import 'package:flutter/foundation.dart';
66

77
import 'hardware_keyboard.dart';
88

9+
export 'hardware_keyboard.dart' show KeyDataTransitMode;
10+
911
/// Override the transit mode with which key events are simulated.
1012
///
1113
/// Setting [debugKeyEventSimulatorTransitModeOverride] is a good way to make

packages/flutter/lib/src/services/font_loader.dart

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import 'dart:ui';
66

77
import 'package:flutter/foundation.dart';
88

9+
export 'dart:typed_data' show ByteData;
10+
911
/// A class that enables the dynamic loading of fonts at runtime.
1012
///
1113
/// The [FontLoader] class provides a builder pattern, where the caller builds

packages/flutter/lib/src/services/hardware_keyboard.dart

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@
55
import 'dart:ui' as ui;
66

77
import 'package:flutter/foundation.dart';
8+
89
import 'binding.dart';
9-
import 'keyboard_key.dart';
1010
import 'raw_keyboard.dart';
1111

12+
export 'dart:ui' show KeyData;
13+
14+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
15+
16+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
17+
export 'raw_keyboard.dart' show RawKeyboard, RawKeyEvent;
18+
1219
/// Represents a lock mode of a keyboard, such as [KeyboardLockMode.capsLock].
1320
///
1421
/// A lock mode locks some of a keyboard's keys into a distinct mode of operation,

packages/flutter/lib/src/services/keyboard_key.dart

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import 'package:flutter/foundation.dart';
66

7+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
8+
79
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
810
// This file is generated by dev/tools/gen_keycodes/bin/gen_keycodes.dart and
911
// should not be edited directly.

packages/flutter/lib/src/services/keyboard_maps.dart

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
import 'keyboard_key.dart';
1313

14+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
15+
1416
/// Maps Android-specific key codes to the matching [LogicalKeyboardKey].
1517
const Map<int, LogicalKeyboardKey> kAndroidToLogicalKey = <int, LogicalKeyboardKey>{
1618
3: LogicalKeyboardKey.goHome,

packages/flutter/lib/src/services/message_codecs.dart

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
99

1010
import 'message_codec.dart';
1111

12+
export 'dart:typed_data' show ByteData;
13+
14+
export 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
15+
16+
export 'message_codec.dart' show MethodCall;
17+
1218
const int _writeBufferStartCapacity = 64;
1319

1420
/// [MessageCodec] with unencoded binary messages represented using [ByteData].

packages/flutter/lib/src/services/mouse_cursor.dart

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import 'package:flutter/gestures.dart';
77

88
import 'system_channels.dart';
99

10+
export 'package:flutter/foundation.dart' show DiagnosticLevel, DiagnosticPropertiesBuilder;
11+
export 'package:flutter/gestures.dart' show PointerEvent;
12+
1013
/// Maintains the state of mouse cursors and manages how cursors are searched
1114
/// for.
1215
///

packages/flutter/lib/src/services/mouse_tracking.dart

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import 'package:flutter/gestures.dart';
77

88
import 'mouse_cursor.dart';
99

10+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
11+
export 'package:flutter/gestures.dart' show PointerEnterEvent, PointerExitEvent, PointerHoverEvent;
12+
13+
export 'mouse_cursor.dart' show MouseCursor;
14+
1015
/// Signature for listening to [PointerEnterEvent] events.
1116
///
1217
/// Used by [MouseTrackerAnnotation], [MouseRegion] and [RenderMouseRegion].

packages/flutter/lib/src/services/platform_channel.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import 'dart:async';
66
import 'dart:developer';
7-
import 'dart:ui' show PlatformMessageResponseCallback;
87

98
import 'package:flutter/foundation.dart';
109

@@ -14,6 +13,9 @@ import 'debug.dart' show debugProfilePlatformChannels;
1413
import 'message_codec.dart';
1514
import 'message_codecs.dart';
1615

16+
export 'binary_messenger.dart' show BinaryMessenger;
17+
export 'message_codec.dart' show MessageCodec, MethodCall, MethodCodec;
18+
1719
bool _debugProfilePlatformChannelsIsRunning = false;
1820
const Duration _debugProfilePlatformChannelsRate = Duration(seconds: 1);
1921
final Expando<BinaryMessenger> _debugBinaryMessengers = Expando<BinaryMessenger>();

packages/flutter/lib/src/services/platform_views.dart

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ import 'package:flutter/gestures.dart';
1111
import 'message_codec.dart';
1212
import 'system_channels.dart';
1313

14+
export 'dart:ui' show Offset, Size, TextDirection, VoidCallback;
15+
16+
export 'package:flutter/gestures.dart' show PointerEvent;
17+
18+
export 'message_codec.dart' show MessageCodec;
19+
1420
/// Converts a given point from the global coordinate system in logical pixels
1521
/// to the local coordinate system for a box.
1622
///

packages/flutter/lib/src/services/raw_keyboard.dart

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ import 'raw_keyboard_web.dart';
1717
import 'raw_keyboard_windows.dart';
1818
import 'system_channels.dart';
1919

20+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder, ValueChanged;
21+
22+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
23+
2024
/// An enum describing the side of the keyboard that a key is on, to allow
2125
/// discrimination between which key is pressed (e.g. the left or right SHIFT
2226
/// key).

packages/flutter/lib/src/services/raw_keyboard_android.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
import 'package:flutter/foundation.dart';
66

7-
import 'keyboard_key.dart';
87
import 'keyboard_maps.dart';
98
import 'raw_keyboard.dart';
109

10+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
11+
12+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
13+
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
14+
1115
// Android sets the 0x80000000 bit on a character to indicate that it is a
1216
// combining character, so we use this mask to remove that bit to make it a
1317
// valid Unicode character again.

packages/flutter/lib/src/services/raw_keyboard_fuchsia.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
import 'package:flutter/foundation.dart';
66

7-
import 'keyboard_key.dart';
87
import 'keyboard_maps.dart';
98
import 'raw_keyboard.dart';
109

10+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
11+
12+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
13+
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
14+
1115
/// Platform-specific key event data for Fuchsia.
1216
///
1317
/// This object contains information about key events obtained from Fuchsia's

packages/flutter/lib/src/services/raw_keyboard_ios.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
import 'package:flutter/foundation.dart';
66

7-
import 'keyboard_key.dart';
87
import 'keyboard_maps.dart';
98
import 'raw_keyboard.dart';
109

10+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
11+
12+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
13+
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
14+
1115
/// Maps iOS specific string values of nonvisible keys to logical keys
1216
///
1317
/// See: https://developer.apple.com/documentation/uikit/uikeycommand/input_strings_for_special_keys?language=objc

packages/flutter/lib/src/services/raw_keyboard_linux.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
import 'package:flutter/foundation.dart';
66

7-
import 'keyboard_key.dart';
87
import 'keyboard_maps.dart';
98
import 'raw_keyboard.dart';
109

10+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
11+
12+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
13+
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
14+
1115
/// Platform-specific key event data for Linux.
1216
///
1317
/// Different window toolkit implementations can map to different key codes. This class

packages/flutter/lib/src/services/raw_keyboard_macos.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
import 'package:flutter/foundation.dart';
66

7-
import 'keyboard_key.dart';
87
import 'keyboard_maps.dart';
98
import 'raw_keyboard.dart';
109

10+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
11+
12+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
13+
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
14+
1115
/// Convert a UTF32 rune to its lower case.
1216
int runeToLowerCase(int rune) {
1317
// Assume only Basic Multilingual Plane runes have lower and upper cases.

packages/flutter/lib/src/services/raw_keyboard_web.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
import 'package:flutter/foundation.dart';
66

7-
import 'keyboard_key.dart';
87
import 'keyboard_maps.dart';
98
import 'raw_keyboard.dart';
109

10+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
11+
12+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
13+
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
14+
1115
String? _unicodeChar(String key) {
1216
if (key.length == 1) {
1317
return key.substring(0, 1);

packages/flutter/lib/src/services/raw_keyboard_windows.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
import 'package:flutter/foundation.dart';
66

7-
import 'keyboard_key.dart';
87
import 'keyboard_maps.dart';
98
import 'raw_keyboard.dart';
109

10+
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
11+
12+
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
13+
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
14+
1115
// Virtual key VK_PROCESSKEY in Win32 API.
1216
//
1317
// Key down events related to IME operations use this as keyCode.

packages/flutter/lib/src/services/restoration.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import 'dart:async';
77
import 'package:flutter/foundation.dart';
88
import 'package:flutter/scheduler.dart';
99

10-
import 'message_codec.dart';
1110
import 'message_codecs.dart';
1211
import 'system_channels.dart';
1312

13+
export 'dart:typed_data' show Uint8List;
14+
1415
typedef _BucketVisitor = void Function(RestorationBucket bucket);
1516

1617
/// Manages the restoration data in the framework and synchronizes it with the

packages/flutter/lib/src/services/system_channels.dart

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import 'dart:ui';
77
import 'message_codecs.dart';
88
import 'platform_channel.dart';
99

10+
export 'platform_channel.dart' show BasicMessageChannel, MethodChannel;
11+
1012
/// Platform channels used by the Flutter system.
1113
class SystemChannels {
1214
// This class is not meant to be instantiated or extended; this constructor

packages/flutter/lib/src/services/system_chrome.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import 'package:flutter/foundation.dart';
1010
import 'binding.dart';
1111
import 'system_channels.dart';
1212

13-
export 'dart:ui' show Brightness;
13+
export 'dart:ui' show Brightness, Color;
14+
15+
export 'binding.dart' show SystemUiChangeCallback;
1416

1517
/// Specifies a particular device orientation.
1618
///

packages/flutter/lib/src/services/text_editing.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'dart:ui' show TextAffinity, TextPosition, TextRange;
66

77
import 'package:flutter/foundation.dart';
88

9-
export 'dart:ui' show TextAffinity, TextPosition, TextRange;
9+
export 'dart:ui' show TextAffinity, TextPosition;
1010

1111
/// A range of text that represents a selection.
1212
@immutable

0 commit comments

Comments
 (0)