SelectionChangedCause for iOS keyboard-select (#122144)

SelectionChangedCause for iOS keyboard-select
This commit is contained in:
Callum Moffat
2023-03-10 14:13:28 -05:00
committed by GitHub
parent d7e851749a
commit e078c93bfe
3 changed files with 42 additions and 5 deletions

View File

@@ -296,6 +296,21 @@ class TestTextInput {
);
}
/// Simulates a scribble interaction finishing.
Future<void> finishScribbleInteraction() async {
assert(isRegistered);
await TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.handlePlatformMessage(
SystemChannels.textInput.name,
SystemChannels.textInput.codec.encodeMethodCall(
MethodCall(
'TextInputClient.scribbleInteractionFinished',
<dynamic>[_client ?? -1,]
),
),
(ByteData? data) { /* response from framework is discarded */ },
);
}
/// Simulates a Scribble focus.
Future<void> scribbleFocusElement(String elementIdentifier, Offset offset) async {
assert(isRegistered);