attach method

TextInputConnection attach (TextInputClient client, TextInputConfiguration configuration)

Begin interacting with the text input control.

Calling this function helps multiple clients coordinate about which one is currently interacting with the text input control. The returned TextInputConnection provides an interface for actually interacting with the text input control.

A client that no longer wishes to interact with the text input control should call TextInputConnection.close on the returned TextInputConnection.


static TextInputConnection attach(TextInputClient client, TextInputConfiguration configuration) {
  assert(client != null);
  assert(configuration != null);
  final TextInputConnection connection = TextInputConnection._(client);
  _clientHandler._currentConnection = connection;
    <dynamic>[ connection._id, configuration.toJson() ],
  return connection;