Unverified Commit bbdf6170 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

Export public API types from services/*.dart library (#106316)

parent c0ac61b5
......@@ -4,7 +4,6 @@
import 'dart:async';
import 'dart:math' as math;
import 'dart:typed_data';
import 'package:flutter/foundation.dart' show kDebugMode;
import 'package:flutter/material.dart';
......
......@@ -4,7 +4,6 @@
import 'dart:async';
import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
import 'package:flutter/services.dart';
import 'pair.dart';
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:typed_data';
import 'package:flutter/services.dart';
import 'package:flutter_gallery/gallery/example_code_parser.dart';
import 'package:flutter_test/flutter_test.dart';
......
......@@ -4,6 +4,8 @@
import 'package:flutter/foundation.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
// This file is generated by dev/tools/gen_keycodes/bin/gen_keycodes.dart and
// should not be edited directly.
......
......@@ -11,6 +11,8 @@
import 'keyboard_key.dart';
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
/// Maps Android-specific key codes to the matching [LogicalKeyboardKey].
const Map<int, LogicalKeyboardKey> kAndroidToLogicalKey = <int, LogicalKeyboardKey>{
@@@ANDROID_KEY_CODE_MAP@@@
......
......@@ -5,7 +5,6 @@
import 'dart:async';
import 'dart:io';
import 'dart:math';
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
......
......@@ -8,7 +8,6 @@ import 'dart:ui' as ui show Scene, SceneBuilder, FlutterView;
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:vector_math/vector_math_64.dart';
import 'binding.dart';
import 'box.dart';
......
......@@ -11,6 +11,9 @@ import 'package:flutter/foundation.dart';
import 'binding.dart';
export 'dart:typed_data' show ByteData;
export 'dart:ui' show ImmutableBuffer;
/// A collection of resources used by the application.
///
/// Asset bundles contain resources, such as images and strings, that can be
......
......@@ -3,8 +3,11 @@
// found in the LICENSE file.
import 'package:flutter/foundation.dart';
import 'text_input.dart';
export 'text_input.dart' show TextEditingValue, TextInputClient, TextInputConfiguration, TextInputConnection;
/// A collection of commonly used autofill hint strings on different platforms.
///
/// Each hint is pre-defined on at least one supported platform. See their
......
......@@ -5,6 +5,9 @@
import 'dart:typed_data';
import 'dart:ui' as ui;
export 'dart:typed_data' show ByteData;
export 'dart:ui' show PlatformMessageResponseCallback;
/// A function which takes a platform message and asynchronously returns an encoded response.
typedef MessageHandler = Future<ByteData?>? Function(ByteData? message);
......
......@@ -14,11 +14,16 @@ import 'asset_bundle.dart';
import 'binary_messenger.dart';
import 'hardware_keyboard.dart';
import 'message_codec.dart';
import 'raw_keyboard.dart';
import 'restoration.dart';
import 'system_channels.dart';
import 'text_input.dart';
export 'dart:ui' show ChannelBuffers;
export 'binary_messenger.dart' show BinaryMessenger;
export 'hardware_keyboard.dart' show HardwareKeyboard, KeyEventManager;
export 'restoration.dart' show RestorationManager;
/// Listens for platform messages and directs them to the [defaultBinaryMessenger].
///
/// The [ServicesBinding] also registers a [LicenseEntryCollector] that exposes
......
......@@ -6,6 +6,8 @@ import 'package:flutter/foundation.dart';
import 'hardware_keyboard.dart';
export 'hardware_keyboard.dart' show KeyDataTransitMode;
/// Override the transit mode with which key events are simulated.
///
/// Setting [debugKeyEventSimulatorTransitModeOverride] is a good way to make
......
......@@ -6,6 +6,8 @@ import 'dart:ui';
import 'package:flutter/foundation.dart';
export 'dart:typed_data' show ByteData;
/// A class that enables the dynamic loading of fonts at runtime.
///
/// The [FontLoader] class provides a builder pattern, where the caller builds
......
......@@ -5,10 +5,17 @@
import 'dart:ui' as ui;
import 'package:flutter/foundation.dart';
import 'binding.dart';
import 'keyboard_key.dart';
import 'raw_keyboard.dart';
export 'dart:ui' show KeyData;
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
export 'raw_keyboard.dart' show RawKeyboard, RawKeyEvent;
/// Represents a lock mode of a keyboard, such as [KeyboardLockMode.capsLock].
///
/// A lock mode locks some of a keyboard's keys into a distinct mode of operation,
......
......@@ -4,6 +4,8 @@
import 'package:flutter/foundation.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
// DO NOT EDIT -- DO NOT EDIT -- DO NOT EDIT
// This file is generated by dev/tools/gen_keycodes/bin/gen_keycodes.dart and
// should not be edited directly.
......
......@@ -11,6 +11,8 @@
import 'keyboard_key.dart';
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
/// Maps Android-specific key codes to the matching [LogicalKeyboardKey].
const Map<int, LogicalKeyboardKey> kAndroidToLogicalKey = <int, LogicalKeyboardKey>{
3: LogicalKeyboardKey.goHome,
......
......@@ -9,6 +9,12 @@ import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
import 'message_codec.dart';
export 'dart:typed_data' show ByteData;
export 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer;
export 'message_codec.dart' show MethodCall;
const int _writeBufferStartCapacity = 64;
/// [MessageCodec] with unencoded binary messages represented using [ByteData].
......
......@@ -7,6 +7,9 @@ import 'package:flutter/gestures.dart';
import 'system_channels.dart';
export 'package:flutter/foundation.dart' show DiagnosticLevel, DiagnosticPropertiesBuilder;
export 'package:flutter/gestures.dart' show PointerEvent;
/// Maintains the state of mouse cursors and manages how cursors are searched
/// for.
///
......
......@@ -7,6 +7,11 @@ import 'package:flutter/gestures.dart';
import 'mouse_cursor.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'package:flutter/gestures.dart' show PointerEnterEvent, PointerExitEvent, PointerHoverEvent;
export 'mouse_cursor.dart' show MouseCursor;
/// Signature for listening to [PointerEnterEvent] events.
///
/// Used by [MouseTrackerAnnotation], [MouseRegion] and [RenderMouseRegion].
......
......@@ -4,7 +4,6 @@
import 'dart:async';
import 'dart:developer';
import 'dart:ui' show PlatformMessageResponseCallback;
import 'package:flutter/foundation.dart';
......@@ -14,6 +13,9 @@ import 'debug.dart' show debugProfilePlatformChannels;
import 'message_codec.dart';
import 'message_codecs.dart';
export 'binary_messenger.dart' show BinaryMessenger;
export 'message_codec.dart' show MessageCodec, MethodCall, MethodCodec;
bool _debugProfilePlatformChannelsIsRunning = false;
const Duration _debugProfilePlatformChannelsRate = Duration(seconds: 1);
final Expando<BinaryMessenger> _debugBinaryMessengers = Expando<BinaryMessenger>();
......
......@@ -11,6 +11,12 @@ import 'package:flutter/gestures.dart';
import 'message_codec.dart';
import 'system_channels.dart';
export 'dart:ui' show Offset, Size, TextDirection, VoidCallback;
export 'package:flutter/gestures.dart' show PointerEvent;
export 'message_codec.dart' show MessageCodec;
/// Converts a given point from the global coordinate system in logical pixels
/// to the local coordinate system for a box.
///
......
......@@ -17,6 +17,10 @@ import 'raw_keyboard_web.dart';
import 'raw_keyboard_windows.dart';
import 'system_channels.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder, ValueChanged;
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
/// An enum describing the side of the keyboard that a key is on, to allow
/// discrimination between which key is pressed (e.g. the left or right SHIFT
/// key).
......
......@@ -4,10 +4,14 @@
import 'package:flutter/foundation.dart';
import 'keyboard_key.dart';
import 'keyboard_maps.dart';
import 'raw_keyboard.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
// Android sets the 0x80000000 bit on a character to indicate that it is a
// combining character, so we use this mask to remove that bit to make it a
// valid Unicode character again.
......
......@@ -4,10 +4,14 @@
import 'package:flutter/foundation.dart';
import 'keyboard_key.dart';
import 'keyboard_maps.dart';
import 'raw_keyboard.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
/// Platform-specific key event data for Fuchsia.
///
/// This object contains information about key events obtained from Fuchsia's
......
......@@ -4,10 +4,14 @@
import 'package:flutter/foundation.dart';
import 'keyboard_key.dart';
import 'keyboard_maps.dart';
import 'raw_keyboard.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
/// Maps iOS specific string values of nonvisible keys to logical keys
///
/// See: https://developer.apple.com/documentation/uikit/uikeycommand/input_strings_for_special_keys?language=objc
......
......@@ -4,10 +4,14 @@
import 'package:flutter/foundation.dart';
import 'keyboard_key.dart';
import 'keyboard_maps.dart';
import 'raw_keyboard.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
/// Platform-specific key event data for Linux.
///
/// Different window toolkit implementations can map to different key codes. This class
......
......@@ -4,10 +4,14 @@
import 'package:flutter/foundation.dart';
import 'keyboard_key.dart';
import 'keyboard_maps.dart';
import 'raw_keyboard.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
/// Convert a UTF32 rune to its lower case.
int runeToLowerCase(int rune) {
// Assume only Basic Multilingual Plane runes have lower and upper cases.
......
......@@ -4,10 +4,14 @@
import 'package:flutter/foundation.dart';
import 'keyboard_key.dart';
import 'keyboard_maps.dart';
import 'raw_keyboard.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
String? _unicodeChar(String key) {
if (key.length == 1) {
return key.substring(0, 1);
......
......@@ -4,10 +4,14 @@
import 'package:flutter/foundation.dart';
import 'keyboard_key.dart';
import 'keyboard_maps.dart';
import 'raw_keyboard.dart';
export 'package:flutter/foundation.dart' show DiagnosticPropertiesBuilder;
export 'keyboard_key.dart' show LogicalKeyboardKey, PhysicalKeyboardKey;
export 'raw_keyboard.dart' show KeyboardSide, ModifierKey;
// Virtual key VK_PROCESSKEY in Win32 API.
//
// Key down events related to IME operations use this as keyCode.
......
......@@ -7,10 +7,11 @@ import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/scheduler.dart';
import 'message_codec.dart';
import 'message_codecs.dart';
import 'system_channels.dart';
export 'dart:typed_data' show Uint8List;
typedef _BucketVisitor = void Function(RestorationBucket bucket);
/// Manages the restoration data in the framework and synchronizes it with the
......
......@@ -7,6 +7,8 @@ import 'dart:ui';
import 'message_codecs.dart';
import 'platform_channel.dart';
export 'platform_channel.dart' show BasicMessageChannel, MethodChannel;
/// Platform channels used by the Flutter system.
class SystemChannels {
// This class is not meant to be instantiated or extended; this constructor
......
......@@ -10,7 +10,9 @@ import 'package:flutter/foundation.dart';
import 'binding.dart';
import 'system_channels.dart';
export 'dart:ui' show Brightness;
export 'dart:ui' show Brightness, Color;
export 'binding.dart' show SystemUiChangeCallback;
/// Specifies a particular device orientation.
///
......
......@@ -6,7 +6,7 @@ import 'dart:ui' show TextAffinity, TextPosition, TextRange;
import 'package:flutter/foundation.dart';
export 'dart:ui' show TextAffinity, TextPosition, TextRange;
export 'dart:ui' show TextAffinity, TextPosition;
/// A range of text that represents a selection.
@immutable
......
......@@ -2,11 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' show TextRange;
import 'package:flutter/foundation.dart';
import 'text_editing.dart';
import 'text_input.dart' show TextEditingValue;
export 'dart:ui' show TextRange;
export 'text_editing.dart' show TextSelection;
export 'text_input.dart' show TextEditingValue;
TextAffinity? _toTextAffinity(String? affinity) {
switch (affinity) {
case 'TextAffinity.downstream':
......
......@@ -8,9 +8,12 @@ import 'dart:math' as math;
import 'package:characters/characters.dart';
import 'package:flutter/foundation.dart';
import 'text_editing.dart';
import 'text_input.dart';
export 'package:flutter/foundation.dart' show TargetPlatform;
export 'text_input.dart' show TextEditingValue;
/// {@template flutter.services.textFormatter.maxLengthEnforcement}
/// ### [MaxLengthEnforcement.enforced] versus
/// [MaxLengthEnforcement.truncateAfterCompositionEnds]
......
......@@ -15,15 +15,22 @@ import 'dart:ui' show
import 'package:flutter/foundation.dart';
import 'package:vector_math/vector_math_64.dart' show Matrix4;
import '../../services.dart' show Clipboard;
import 'autofill.dart';
import 'clipboard.dart' show Clipboard;
import 'message_codec.dart';
import 'platform_channel.dart';
import 'system_channels.dart';
import 'text_editing.dart';
import 'text_editing_delta.dart';
export 'dart:ui' show TextAffinity;
export 'dart:ui' show Brightness, FontWeight, Offset, Rect, Size, TextAlign, TextDirection, TextPosition, TextRange;
export 'package:vector_math/vector_math_64.dart' show Matrix4;
export 'autofill.dart' show AutofillConfiguration, AutofillScope;
export 'text_editing.dart' show TextSelection;
// TODO(a14n): the following export leads to Segmentation fault, see https://github.com/flutter/flutter/issues/106332
// export 'text_editing_delta.dart' show TextEditingDelta;
/// Indicates how to handle the intelligent replacement of dashes in text input.
///
......
......@@ -2,8 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui' show TextRange;
import 'text_editing.dart';
export 'dart:ui' show TextPosition, TextRange;
export 'text_editing.dart' show TextSelection;
/// A read-only interface for accessing visual information about the
/// implementing text.
abstract class TextLayoutMetrics {
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:ui';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
......
......@@ -3,7 +3,6 @@
// found in the LICENSE file.
import 'dart:convert' show jsonDecode;
import 'dart:ui';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:typed_data';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
......
......@@ -8,7 +8,6 @@
import 'dart:convert';
import 'dart:typed_data';
import 'package:flutter/foundation.dart' show WriteBuffer;
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.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 'package:flutter/painting.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
......
......@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:typed_data';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
......
......@@ -2,9 +2,7 @@
// 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:typed_data';
import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart';
......
......@@ -4,7 +4,6 @@
import 'dart:convert' show jsonDecode;
import 'dart:ui';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
......
......@@ -3,7 +3,6 @@
// found in the LICENSE file.
import 'dart:convert' show utf8;
import 'dart:ui';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
......
......@@ -5,7 +5,6 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
......
......@@ -3,9 +3,7 @@
// found in the LICENSE file.
import 'dart:async';
import 'dart:ui' show Rect, Offset;
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import '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:typed_data';
import 'dart:ui' as ui;
import 'package:flutter/services.dart';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment