activeTextInput method

void activeTextInput()

Implementation

void activeTextInput() {
  _inputValueAtBegin = value;

  _textInputConfiguration ??= TextInputConfiguration(
    inputType: _textInputType,
    obscureText: obscureText,
    autocorrect: autoCorrect,
    inputAction: _textInputType == TextInputType.multiline
      ? TextInputAction.newline
      : _textInputAction,
    textCapitalization: TextCapitalization.none,
    keyboardAppearance: Brightness.light,
  );

  if (_textInputConnection == null || !_textInputConnection!.attached) {
    final TextEditingValue localValue = _value;
    _lastKnownRemoteTextEditingValue = localValue;

    _textInputConnection = TextInput.attach(this, _textInputConfiguration!);
    _textInputConnection!.setEditingState(localValue);
  }

  // FIXME: hide virtual keyword will make real keyboard could not input also
  if (!_hideVirtualKeyboard) {
    _textInputConnection!.show();
  }
  _startCursorTimer();
}