closeConnection method

void closeConnection()

Simulates the user closing the text input connection.

For example:

  • User pressed the home button and sent the application to background.
  • User closed the virtual keyboard.

This can be called even if the TestTextInput has not been registered.

If this is used to inject text when there is a real IME connection, for example when using the integration_test library, there is a risk that the real IME will become confused as to the current state of input.


void closeConnection() {
         <dynamic>[_client ?? -1],
    (ByteData? data) { /* response from framework is discarded */ },