Skip to content

Commit 338841a

Browse files
authored
Revert "Revert "Revert "Scribble mixin (#104128)" (#114647)" (#114698)" (#115146)
This reverts commit 3cde69e.
1 parent 098aac7 commit 338841a

14 files changed

+462
-730
lines changed

packages/flutter/lib/services.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export 'src/services/raw_keyboard_macos.dart';
3737
export 'src/services/raw_keyboard_web.dart';
3838
export 'src/services/raw_keyboard_windows.dart';
3939
export 'src/services/restoration.dart';
40-
export 'src/services/scribble.dart';
4140
export 'src/services/service_extensions.dart';
4241
export 'src/services/spell_check.dart';
4342
export 'src/services/system_channels.dart';

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import 'binary_messenger.dart';
1515
import 'hardware_keyboard.dart';
1616
import 'message_codec.dart';
1717
import 'restoration.dart';
18-
import 'scribble.dart';
1918
import 'service_extensions.dart';
2019
import 'system_channels.dart';
20+
import 'text_input.dart';
2121

2222
export 'dart:ui' show ChannelBuffers, RootIsolateToken;
2323

@@ -43,7 +43,7 @@ mixin ServicesBinding on BindingBase, SchedulerBinding {
4343
SystemChannels.system.setMessageHandler((dynamic message) => handleSystemMessage(message as Object));
4444
SystemChannels.lifecycle.setMessageHandler(_handleLifecycleMessage);
4545
SystemChannels.platform.setMethodCallHandler(_handlePlatformMessage);
46-
Scribble.ensureInitialized();
46+
TextInput.ensureInitialized();
4747
readInitialLifecycleStateFromNativeWindow();
4848
}
4949

@@ -326,6 +326,7 @@ mixin ServicesBinding on BindingBase, SchedulerBinding {
326326
void setSystemUiChangeCallback(SystemUiChangeCallback? callback) {
327327
_systemUiChangeCallback = callback;
328328
}
329+
329330
}
330331

331332
/// Signature for listening to changes in the [SystemUiMode].

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

Lines changed: 0 additions & 243 deletions
This file was deleted.

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

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -222,38 +222,6 @@ class SystemChannels {
222222
JSONMethodCodec(),
223223
);
224224

225-
/// A JSON [MethodChannel] for handling handwriting input.
226-
///
227-
/// This method channel is used by iPadOS 14's Scribble feature where writing
228-
/// with an Apple Pencil on top of a text field inserts text into the field.
229-
///
230-
/// The following methods are defined for this channel:
231-
///
232-
/// * `Scribble.focusElement`: Indicates that focus is requested at the given
233-
/// [Offset].
234-
///
235-
/// * `Scribble.requestElementsInRect`: Returns a List of identifiers and
236-
/// bounds for the [ScribbleClient]s that lie within the given Rect.
237-
///
238-
/// * `Scribble.scribbleInteractionBegan`: Indicates that handwriting input
239-
/// has started.
240-
///
241-
/// * `Scribble.scribbleInteractionFinished`: Indicates that handwriting input
242-
/// has ended.
243-
///
244-
/// * `Scribble.showToolbar`: Requests that the toolbar be shown, such as
245-
/// when selection is changed by handwriting.
246-
///
247-
/// * `Scribble.insertTextPlaceholder`: Requests that visual writing space is
248-
/// reserved.
249-
///
250-
/// * `Scribble.removeTextPlaceholder`: Requests that any placeholder writing
251-
/// space is removed.
252-
static const MethodChannel scribble = OptionalMethodChannel(
253-
'flutter/scribble',
254-
JSONMethodCodec(),
255-
);
256-
257225
/// A [MethodChannel] for handling spell check for text input.
258226
///
259227
/// This channel exposes the spell check framework for supported platforms.

0 commit comments

Comments
 (0)