support disabling text entry emulation (#13410)

This commit is contained in:
Yegor
2017-12-06 19:59:07 -08:00
committed by GitHub
parent bf4409f1f3
commit d1e918fa10
5 changed files with 67 additions and 0 deletions

View File

@@ -24,6 +24,15 @@ class TestTextInput {
SystemChannels.textInput.setMockMethodCallHandler(_handleTextInputCall);
}
/// Removes this object as a mock handler for [SystemChannels.textInput].
///
/// After calling this method, the channel will exchange messages with the
/// Flutter engine. Use this with [FlutterDriver] tests that need to display
/// on-screen keyboard provided by the operating system.
void unregister() {
SystemChannels.textInput.setMockMethodCallHandler(null);
}
int _client = 0;
/// Arguments supplied to the TextInput.setClient method call.