openOrCloseConnection method

void openOrCloseConnection()
inherited

Opens or closes input connection based on the current state of focusNode and value.

Implementation

void openOrCloseConnection() {
  if (widget.focusNode.hasFocus && widget.focusNode.consumeKeyboardToken()) {
    openConnectionIfNeeded();
  } else if (!widget.focusNode.hasFocus) {
    closeConnectionIfNeeded();
  }
}