setInputControl static method

void setInputControl(
  1. TextInputControl? newControl

Sets the current text input control.

The current text input control receives text input state changes and visual text input control requests, such as showing and hiding the input control, from the framework.

Setting the current text input control as null removes the visual text input control.

See also:


static void setInputControl(TextInputControl? newControl) {
  final TextInputControl? oldControl = _instance._currentControl;
  if (newControl == oldControl) {
  if (newControl != null) {
  if (oldControl != null) {
  _instance._currentControl = newControl;
  final TextInputClient? client = _instance._currentConnection?._client;
  client?.didChangeInputControl(oldControl, newControl);