closeConnectionIfNeeded method

void closeConnectionIfNeeded()
inherited

Closes input connection if it's currently open. Otherwise does nothing.

Implementation

void closeConnectionIfNeeded() {
  if (hasConnection) {
    _textInputConnection!.close();
    _textInputConnection = null;
    _lastKnownRemoteTextEditingValue = null;
    _sentRemoteValues.clear();
  }
}