didChangeInputControl method

  1. @override
void didChangeInputControl(
  1. TextInputControl? oldControl,
  2. TextInputControl? newControl
)
override

The framework calls this method to notify that the text input control has been changed.

The TextInputClient may switch to the new text input control by hiding the old and showing the new input control.

See also:

Implementation

@override
void didChangeInputControl(TextInputControl? oldControl, TextInputControl? newControl) {
  if (_hasFocus && _hasInputConnection) {
    oldControl?.hide();
    newControl?.show();
  }
}