requestKeyboard method

void requestKeyboard()

Express interest in interacting with the keyboard.

If this control is already attached to the keyboard, this function will request that the keyboard become visible. Otherwise, this function will ask the focus system that it become focused. If successful in acquiring focus, the control will then attach to the keyboard and request that the keyboard become visible.

Implementation

void requestKeyboard() {
  if (_hasFocus) {
    _openInputConnection();
  } else {
    _flagInternalFocus();
    widget.focusNode.requestFocus(); // This eventually calls _openInputConnection also, see _handleFocusChanged.
  }
}